+ASCII_BOLD="\e[1m"
+ASCII_RESET="\e[0m"
+
+modules=`ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+if [ -f summary.xml ] ; then unlink summary.xml ; fi
+
+if [ $opt_tct == 1 ] ; then
+ # Use Test-kit lite
+ # Run all test case executables serially, create XML output
+ if [ -n "$1" ] ; then
+ execute_tct $1 $*
+ else
+ for mod in $modules
+ do
+ if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
+
+ echo -ne "$ASCII_BOLD"
+ echo -e "Executing $mod$ASCII_RESET"
+ execute_tct $mod $*
+ fi
+ done
+ fi
+
+ scripts/summarize.pl
+
+else
+ # Execute test cases using own test harness
+
+ if [ -z "$1" ] ; then
+ # No arguments:
+ # Execute each test executable in turn (by default, runs tests in parallel)
+ summary_start
+ for mod in $modules
+ do
+ echo -e "$ASCII_BOLD"
+ echo -e "Executing $mod$ASCII_RESET"
+ build/src/$mod/tct-$mod-core -r $opt_serial
+ done
+ summary_end
+
+ elif [ -f "build/src/$1/tct-$1-core" ] ; then
+ # First argument is an executable filename - execute only that with any
+ # remaining arguments
+ summary_start
+ module=$1
+ shift;
+ build/src/$module/tct-$module-core -r $opt_serial $*
+ summary_end
+
+ else
+ # First argument is not an executable. Is it a test case name?
+ # Try executing each executable with the test case name until success/known failure
+ for mod in $modules
+ do
+ output=`build/src/$mod/tct-$mod-core $1`
+ ret=$?
+ if [ $ret -ne 6 ] ; then
+ if [ $opt_debug -ne 0 ] ; then
+ gdb --args build/src/$mod/tct-$mod-core $1
+ else
+ echo $output
+ if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
+ fi
+ exit $ret
+ fi
+ done
+ echo $1 not found
+ fi
+fi
+
+if [ -f summary.xml ] ; then
+ scripts/output_summary.pl
+fi
+
+exit $?