+if [ $opt_modules == 1 ] ; then
+ modules= get_modules
+ echo $modules
+ exit 0
+fi
+
+# Clean up old test results
+rm -f tct*core-tests.xml
+
+# Clean up old coverage data
+[ -d ../build/tizen ] && rm -f ../build/tizen/dali/.libs/*.gcda
+[ -d ../build/tizen-cmake ] && find ../build/tizen-cmake/ -name \*.gcda -exec rm {} \;
+
+find build \( -name "*.gcda" \) -exec rm '{}' \;
+
+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"
+ output_start $mod
+ dbus-launch build/src/$mod/tct-$mod-core $opt_serial $opt_noFailedRerun $opt_quiet $opt_match
+ output_end $mod
+ 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;
+ output_start ${module}
+ dbus-launch build/src/$module/tct-$module-core $opt_serial $opt_noFailedRerun $opt_quiet $opt_match $*
+ output_end ${module}
+ 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
+ echo DEBUGGING:
+ dbus-launch 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 $?