+TEMP=`getopt -o dhsSm --long debug,help,serial,tct,modules -n 'execute.sh' -- "$@"`
+
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+
+# Note the quotes around `$TEMP': they are essential!
+eval set -- "$TEMP"
+
+function usage
+{
+ echo -e "Usage: execute.sh [-d][-s|-S|-r] [module|testcase]"
+ echo -e " execute.sh\t\tExecute test cases from all modules in parallel"
+ echo -e " execute.sh -d <testcase>\tDebug testcase"
+ echo -e " execute.sh [module]\tExecute test cases from the given module in parallel"
+ echo -e " execute.sh -s [module]\t\tExecute test cases in serial using Testkit-Lite"
+ echo -e " execute.sh -S [module]\t\tExecute test cases in serial"
+ echo -e " execute.sh <testcase>\tFind and execute the given test case"
+ exit 2
+}
+
+opt_tct=0
+opt_serial=""
+opt_modules=0
+opt_debug=0
+while true ; do
+ case "$1" in
+ -h|--help) usage ;;
+ -d|--debug) opt_debug=1 ; shift ;;
+ -s|--tct) opt_tct=1 ; shift ;;
+ -S|--serial) opt_serial="-s" ; shift ;;
+ -m|--modules) opt_modules=1 ; shift ;;
+ --) shift; break;;
+ *) echo "Internal error $1!" ; exit 1 ;;
+ esac
+done
+
+function execute_tct