Problem is that you're changing value of IFS on top of your script to colon :
and then passing arguments to your script test.sh
while IFS is still set to :
. Which in effect is being called as:
1st time:
sh test.sh "-d somedesc -l somelabel"
and 2nd time:
sh test.sh " -d anotherdesc -l anotherlabel"
Thus making argument list into a single argument and getops fails.
What you need to do is to save original IFS before you set it to colon and restore it after set command like this:
#!/bin/bash
INFO="12345,-d somedesc -l somelabel:6789, -d anotherdesc -l anotherlabel"
# save IFS value
OLDIFS=$IFS
IFS=":"
set $INFO
# restore saved IFS value
IFS=$OLDIFS
echo 'Parsing INFO '$INFO
for item
do
echo 'Item is '$item
#parsing each item to separate id and options
ID=`echo "$item" | awk -F "," "{ print $"1" }"`
echo 'ID is '$ID
OPTIONS=`echo "$item" | awk -F "," "{ print $"2" }"`
echo 'Invoking Test Script with '$OPTIONS
sh test.sh $OPTIONS
done