- for mod in `ls -1 src/ | grep -v CMakeList `
- do
- if [ $mod != 'common' ] && [ $mod != 'manual' ]; then
- echo EXECUTING $mod
- execute $mod $*
+ # if $1 is an executable filename, execute it·
+
+ if [ -z "$1" ] ; then
+ # No arguments:
+ # Execute each test executable in turn, using parallel execution
+ for mod in `ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+ do
+ echo -e "$ASCII_BOLD"
+ echo -e "Executing $mod$ASCII_RESET"
+ build/src/$mod/tct-$mod-core $opt_rerun
+ done
+
+ elif [ -f "build/src/$1/tct-$1-core" ] ; then
+ # First argument is an executable filename - execute only that with any
+ # remaining arguments
+ module=$1
+ shift;
+ build/src/$module/tct-$module-core $opt_rerun $*
+
+ 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 `ls -1 src/ | grep -v CMakeList | grep -v common | grep -v manual`
+ do
+ output=`build/src/$mod/tct-$mod-core $1`
+ ret=$?
+ if [ $ret -ne 6 ] ; then
+ echo $output
+ if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi
+ exit $ret
+ fi
+ done
+ echo $1 not found