Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
data from alpha (little64). Thanks to Abdou
[simgrid.git] / testsuite / run_tests.in
1 #! @BASH@
2 failed_nb=0
3 success_nb=0
4 ignored_nb=0
5 tests_nb=0
6
7 rm -f test.failed test.success test.ignored
8
9 if [ xvalgrind = "x$1" ] ; then
10   valgrind=valgrind
11 else
12   valgrind=
13 fi
14 #           config_usage                        \
15 for test in log_usage                           \
16             dynar_int dynar_double dynar_string \
17             dict_usage dict_crash               \
18             \
19             datadesc_usage                      \
20             "datadesc_usage --read datadesc.little32" \
21             "datadesc_usage --read datadesc.little64" \
22             "datadesc_usage --read datadesc.big32"  \
23             "datadesc_usage --read datadesc.big64" 
24 do                  
25   tests_nb=`expr $tests_nb + 1`
26   echo "#### Test $test"
27   if [ "x$test" = "xdict_crash" ] ; then
28     ./$test --gras-log="root.thres=info" 2>&1
29   else 
30     $valgrind ./$test --gras-log="root.thres=info" 2>&1
31   fi
32   retval=$?
33   if [ $retval != 0 ] ; then if [ $retval != 77 ]; then
34     echo "## failed. Rerun $test with full details."
35     if [ "x$test" = "xdict_crash" ] ; then
36       ./$test --gras-log="root.thres=debug" 2>&1
37     else 
38       $valgrind ./$test --gras-log="root.thres=debug" 2>&1
39     fi
40     failed_nb=`expr $failed_nb + 1`
41     echo "  $test (returned $retval)" >> test.failed
42   else # retval == 77
43     echo "## Ignored since it returned 77"
44     ignored_nb=`expr $ignored_nb + 1`
45     echo "  $test" >> test.ignored
46   fi else
47     echo "## Success"
48     success_nb=`expr $success_nb + 1`
49     echo "  $test" >> test.success
50   fi
51 done
52
53
54 echo
55 echo "#### Summary"
56 echo "$success_nb tests of $tests_nb successfull:"
57 cat test.success
58
59 if [ $ignored_nb != 0 ] ; then
60   echo "$failed_nb tests of $tests_nb ignored:"
61   cat test.ignored
62   echo "  (they returned 77, meaning that they are not applicable)"
63 fi
64 if [ $failed_nb != 0 ] ; then
65   echo "$failed_nb tests of $tests_nb failed: "
66   cat test.failed
67   echo "Rerun the tests using the following command: script -c 'make test' gras.tests.log"
68   echo " and send the following informations to martin.quinson@ens-lyon.fr:"
69   echo "   - the file gras.tests.log produced by this command."
70   echo "   - a short description of the target platform (arch, OS, distrib, compiler)."
71   echo "   - the config.log produced by the compilation."
72 fi
73
74 rm -f test.success test.failed test.ignored
75 exit $failed_nb