Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Stupid me. Using rand to generate the datatest is not very wise...
[simgrid.git] / testsuite / run_tests.in
1 #! @BASH@
2 failed_nb=0
3 success_nb=0
4 tests_nb=0
5 if [ xvalgrind = "x$1" ] ; then
6   valgrind=valgrind
7 else
8   valgrind=
9 fi
10 for test in log_usage                           \
11             dynar_int dynar_double dynar_string \
12             dict_usage dict_crash               \
13             config_usage                        \
14             \
15             datadesc_usage
16 do                  
17   tests_nb=`expr $tests_nb + 1`
18   echo "#### Test $test"
19   if [ "x$test" = "xdict_crash" ] ; then
20     ./$test --gras-log="root.thres=info" 2>&1
21   else 
22     $valgrind ./$test --gras-log="root.thres=info" 2>&1
23   fi
24   if [ $? != 0 ] ; then
25     echo "## failed. Rerun $test with full details."
26     if [ "x$test" = "xdict_crash" ] ; then
27       ./$test --gras-log="root.thres=debug" 2>&1
28     else 
29       $valgrind ./$test --gras-log="root.thres=debug" 2>&1
30     fi
31     failed_nb=`expr $failed_nb + 1`
32     failed="$failed $test"
33   else
34     echo "## Success"
35     success_nb=`expr $success_nb + 1`
36     success="$success $test"
37   fi
38 done
39 failed=`echo $failed|sed 's|^ ||'`
40 success=`echo $success|sed 's|^ ||'`
41 echo
42 echo "#### Summary"
43 echo "$success_nb tests of $tests_nb successfull ($success)"
44 if [ $failed_nb != 0 ] ; then
45   echo "$failed_nb tests of $tests_nb failed ($failed)"
46   echo "Rerun the tests using the following command: script -c 'make test' gras.tests.log"
47   echo " and send the following informations to martin.quinson@ens-lyon.fr:"
48   echo "   - the file gras.tests.log produced by this command"
49   echo "   - a short description of the target platform (arch, OS, distrib, compiler)."
50   echo "   - the config.log produced by the compilation, if possible."
51 fi
52 exit $failed_nb