X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fexecute.sh;h=7703340d40120c4061b2c8c6139110ff4f9fbf8f;hp=64e27eeab7584410cd3928f862e56cdddb1ca057;hb=41d36118a13932bcf1db39b780ac437fcda8aa08;hpb=edd951c375ac2a6ec5701aa850637503ba1348c8 diff --git a/automated-tests/execute.sh b/automated-tests/execute.sh index 64e27ee..7703340 100755 --- a/automated-tests/execute.sh +++ b/automated-tests/execute.sh @@ -1,6 +1,6 @@ #!/bin/bash -TEMP=`getopt -o hsSm --long help,serial,tct,modules -n 'execute.sh' -- "$@"` +TEMP=`getopt -o dhsSmf --long debug,help,failnorerun,serial,tct,modules -n 'execute.sh' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -9,8 +9,10 @@ eval set -- "$TEMP" function usage { - echo -e "Usage: execute.sh [-s|-S|-r] [module|testcase]" + 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 -f \tExecute test cases from all modules in parallel without rerunning failed test cases" + echo -e " execute.sh -d \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" @@ -21,10 +23,14 @@ function usage opt_tct=0 opt_serial="" opt_modules=0 +opt_debug=0 +opt_noFailedRerun=""; while true ; do case "$1" in -h|--help) usage ;; + -d|--debug) opt_debug=1 ; shift ;; -s|--tct) opt_tct=1 ; shift ;; + -f|--nofailedrerun) opt_noFailedRerun="-f" ; shift ;; -S|--serial) opt_serial="-s" ; shift ;; -m|--modules) opt_modules=1 ; shift ;; --) shift; break;; @@ -71,9 +77,8 @@ fi rm -f tct*core-tests.xml # Clean up old coverage data -if [ -d ../build/tizen ] ; then - rm -f ../build/tizen/dali-toolkit/.libs/*.gcda -fi +[ -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 '{}' \; @@ -113,7 +118,7 @@ else do echo -e "$ASCII_BOLD" echo -e "Executing $mod$ASCII_RESET" - build/src/$mod/tct-$mod-core -r $opt_serial + build/src/$mod/tct-$mod-core $opt_serial $opt_noFailedRerun done summary_end @@ -123,20 +128,26 @@ else summary_start module=$1 shift; - build/src/$module/tct-$module-core -r $opt_serial $* + build/src/$module/tct-$module-core $opt_serial $opt_noFailedRerun $* 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 + # 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 - echo $output - if [ $ret -eq 0 ] ; then echo -e "\nPassed" ; fi - exit $ret + if [ $opt_debug -ne 0 ] ; then + echo DEBUGGING: + 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