Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Redirect tests stderr to &1 to be usable in a |less
[simgrid.git] / testsuite / gras / run_tests
1 #! /bin/bash
2 failed_nb=0
3 success_nb=0
4 tests_nb=0
5 for test in log_usage                           \
6             dynar_int dynar_double dynar_string \
7             dict_usage dict_crash               \
8             config_usage                        \
9             \
10             gs_example
11 do                  
12   tests_nb=`expr $tests_nb + 1`
13   echo "#### Test $test"
14   ./$test --gras-log="root.thres=info" 2>&1
15   if [ $? != 0 ] ; then
16     echo "## failed. Rerun $test with full details."
17     ./$test --gras-log="root.thres=debug" 2>&1
18     failed_nb=`expr $failed_nb + 1`
19     failed="$failed $test"
20   else
21     echo "## Success"
22     success_nb=`expr $success_nb + 1`
23     success="$success $test"
24   fi
25 done
26 failed=`echo $failed|sed 's|^ ||'`
27 success=`echo $success|sed 's|^ ||'`
28 echo
29 echo "#### Summary"
30 echo "$success_nb tests of $tests_nb successfull ($success)"
31 if [ $failed_nb != 0 ] ; then
32   echo "$failed_nb tests of $tests_nb failed ($failed)"
33   echo "Rerun the tests using the following command: script -c 'make test'"
34   echo " and send the file typescript it will produce to martin.quinson@ens-lyon.fr"
35   echo " along with a short description of the target platform (arch, OS, distrib, compiler)."
36 fi
37 exit $failed_nb