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 xbt/log_usage@EXEEXT@; \
35 xbt/context_usage@EXEEXT@; \
36 xbt/graphxml_usage@EXEEXT@ @srcdir@/xbt/graph.xml; \
37 xbt/heap_bench@EXEEXT@;"
39 surf_TESTS="surf/maxmin_usage@EXEEXT@; \
40 surf/maxmin_bench@EXEEXT@; \
41 surf/trace_usage@EXEEXT@ --surf-path=@srcdir@/surf/; \
42 surf/surf_usage@EXEEXT@ --surf-path=@srcdir@/surf/ platform.xml; \
43 surf/surf_usage2@EXEEXT@ --surf-path=@srcdir@/surf/ platform.xml;"
45 gras_TESTS="gras/trp_tcp_usage; gras/trp_file_usage; \
46 gras/datadesc_usage@EXEEXT@; \
47 gras/datadesc_usage@EXEEXT@ --copy; \
48 gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.little32; \
49 gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.little64;"
51 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.little32_4;\
52 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.big32; \
53 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.big32_8_4; \
54 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.big32_2;
56 simdag_TESTS="simdag/sd_test --surf-path=@srcdir@/simdag @srcdir@/simdag/small_platform_variable.xml; \
57 simdag/sd_test @top_srcdir@/examples/msg/small_platform.xml; \
58 simdag/sd_test @top_srcdir@/examples/msg/msg_platform.xml; "
60 # Data sets still to regenerate:
62 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.big32_4; \
63 # gras/datadesc_usage@EXEEXT@ --read @srcdir@/gras/datadesc.big64;"
66 ## Loop on all tests to run them
69 # we split tests on ';' so that they can contain spaces (test=accumulator)
72 for testpart in $xbt_TESTS $gras_TESTS $surf_TESTS $simdag_TESTS
74 test="$test $testpart"
75 if echo $test | grep ';' >/dev/null ; then
76 # end of test declaration found.
78 # we must have a space after the ;
79 if echo $test | egrep ';[^ ]' ; then
80 echo "$0.in broken: you should add a space after each ';'"
84 # Cleanup test declaration, run it.
85 test=`echo $test | sed 's/;//'`
87 if [ ".$1" = .windump ] ; then
88 test=`echo $test | sed 's|/home.*testsuite/|//10.0.2.4/qemu/testsuite/|'`
89 test=`echo $test | sed 's|/|\\\\|g'`
90 echo "\\\\10.0.2.4\\qemu\\testsuite\\$test"
91 echo "@if errorlevel 1 echo ERRORERRORERRORERRORERRORERRORERRORERRORERRORERRORERRORERROR"
94 tests_nb=`expr $tests_nb + 1`
95 echo "#### Test $test"
96 if [ x@EXEEXT@ = x ] ; then
99 # overwrites "valgrind" as a value, but should be exclusive.
103 if [ "x$test" = "xxbt/dict_crash@EXEEXT@" ] ; then
104 if echo $exenv | grep valgrind >/dev/null ; then
107 $exenv ./$test --log="root.thres=info" 2>&1
110 if [ x@EXEEXT@ != x ] && [ x$exenv = xwine ] ; then
111 if echo ${test} | grep @EXEEXT@ >/dev/null ; then : ; else
115 $exenv ./$test --log="root.thres=info" 2>&1
119 if [ $retval != 0 ] ; then if [ $retval != 77 ]; then
120 echo "## failed" # . Rerun $test with full details."
121 # if [ "x$test" = "xdict_crash" ] ; then
122 # $exenv ./$test --log="root.thres=debug" 2>&1
124 # $exenv ./$test --log="root.thres=debug" 2>&1
126 failed_nb=`expr $failed_nb + 1`
127 echo " $test (returned $retval)" >> test.failed
129 echo "## Ignored since it returned 77"
130 ignored_nb=`expr $ignored_nb + 1`
131 echo " $test" >> test.ignored
134 success_nb=`expr $success_nb + 1`
135 echo " $test" >> test.success
138 fi # end of ';' found in test declaration => run it
139 fi # end of run it only if not in windump mode
145 if [ ".$1" = .windump ] ; then
152 echo "$success_nb tests of $tests_nb successfull:"
155 if [ $ignored_nb != 0 ] ; then
156 echo "$failed_nb tests of $tests_nb ignored:"
158 echo " (they returned 77, meaning that they are not applicable)"
160 if [ $failed_nb != 0 ] ; then
161 echo "$failed_nb tests of $tests_nb failed: "
163 echo "Rerun the tests using the following command: script -c 'make check' simgrid.tests.log"
164 echo " and send the following informations to simgrid-devel@lists.gforge.inria.fr:"
165 echo " - the file simgrid.tests.log produced by this command."
166 echo " - a short description of the target platform (arch, OS, distrib, compiler)."
167 echo " - the config.log produced by the compilation."
170 rm -f test.success test.failed test.ignored