4 ## Cleanups of previous executions
11 rm -f test.failed test.success test.ignored
13 # Work around a libtool issue on solaris, making sure that it works even on sh older than tcsh
14 LD_LIBRARY_PATH=@top_srcdir@/src/.libs
15 if export LD_LIBRARY_PATH ; then
18 setenv LD_LIBRARY_PATH @top_srcdir@/src/.libs
22 ## Args parsing (simplistic for now)
24 if [ xvalgrind = "x$1" ] ; then
25 exenv="libtool --mode=execute valgrind --show-reachable=yes"
34 ##########################################################################
35 ## UPDATE buildtools/Cmake/CTestList.txt WHEN YOU CHANGE SOMETHING HERE ##
36 ##########################################################################
39 xbt/log_usage@EXEEXT@; \
40 xbt/graphxml_usage@EXEEXT@ @srcdir@/xbt/graph.xml; \
41 xbt/heap_bench@EXEEXT@;"
43 surf_TESTS="surf/lmm_usage@EXEEXT@; \
44 surf/maxmin_bench@EXEEXT@; \
45 surf/trace_usage@EXEEXT@ --cfg=path:@srcdir@/surf/; \
46 surf/surf_usage@EXEEXT@ --cfg=path:@srcdir@/surf/ platform.xml; \
47 surf/surf_usage2@EXEEXT@ --cfg=path:@srcdir@/surf/ platform.xml;"
49 simdag_TESTS="simdag/sd_test --cfg=path:@srcdir@/simdag @srcdir@/simdag/small_platform_variable.xml; \
50 simdag/sd_test @top_srcdir@/examples/msg/small_platform.xml; \
51 simdag/sd_test @top_srcdir@/examples/msg/msg_platform.xml; "
55 ## Loop on all tests to run them
58 # we split tests on ';' so that they can contain spaces (test=accumulator)
61 for testpart in $xbt_TESTS $surf_TESTS $simdag_TESTS
63 test="$test $testpart"
64 if echo $test | grep ';' >/dev/null ; then
65 # end of test declaration found.
67 # we must have a space after the ;
68 if echo $test | egrep ';[^ ]' ; then
69 echo "$0.in broken: you should add a space after each ';'"
73 # Cleanup test declaration, run it.
74 test=`echo $test | sed 's/;//'`
76 if [ ".$1" = .windump ] ; then
77 test=`echo $test | sed 's|/home.*testsuite/|//10.0.2.4/qemu/testsuite/|'`
78 test=`echo $test | sed 's|/|\\\\|g'`
79 echo "\\\\10.0.2.4\\qemu\\testsuite\\$test"
80 echo "@if errorlevel 1 echo ERRORERRORERRORERRORERRORERRORERRORERRORERRORERRORERRORERROR"
83 tests_nb=`expr $tests_nb + 1`
84 echo "#### Test $test"
85 if [ x@EXEEXT@ = x ] ; then
88 # overwrites "valgrind" as a value, but should be exclusive.
92 if [ "x$test" = "xxbt/dict_crash@EXEEXT@" ] ; then
93 if echo $exenv | grep valgrind >/dev/null ; then
96 $exenv ./$test --log="root.thres=info" 2>&1
99 if [ x@EXEEXT@ != x ] && [ x$exenv = xwine ] ; then
100 if echo ${test} | grep @EXEEXT@ >/dev/null ; then : ; else
104 $exenv ./$test --log="root.thres=info" 2>&1
108 if [ $retval != 0 ] ; then if [ $retval != 77 ]; then
109 echo "## failed" # . Rerun $test with full details."
110 # if [ "x$test" = "xdict_crash" ] ; then
111 # $exenv ./$test --log="root.thres=debug" 2>&1
113 # $exenv ./$test --log="root.thres=debug" 2>&1
115 failed_nb=`expr $failed_nb + 1`
116 echo " $test (returned $retval)" >> test.failed
118 echo "## Ignored since it returned 77"
119 ignored_nb=`expr $ignored_nb + 1`
120 echo " $test" >> test.ignored
123 success_nb=`expr $success_nb + 1`
124 echo " $test" >> test.success
127 fi # end of ';' found in test declaration => run it
128 fi # end of run it only if not in windump mode
134 if [ ".$1" = .windump ] ; then
141 echo "$success_nb tests of $tests_nb successfull:"
144 if [ $ignored_nb != 0 ] ; then
145 echo "$failed_nb tests of $tests_nb ignored:"
147 echo " (they returned 77, meaning that they are not applicable)"
149 if [ $failed_nb != 0 ] ; then
150 echo "$failed_nb tests of $tests_nb failed: "
152 echo "Rerun the tests using the following command: script -c 'make check' simgrid.tests.log"
153 echo " and send the following informations to simgrid-devel@lists.gforge.inria.fr:"
154 echo " - the file simgrid.tests.log produced by this command."
155 echo " - a short description of the target platform (arch, OS, distrib, compiler)."
156 echo " - the config.log produced by the compilation."
159 rm -f test.success test.failed test.ignored