Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
still not our
[simgrid.git] / teshsuite / smpi / mpich3-test / generate_report
1 #! /bin/bash
2
3 explore_files() {
4
5   for cmake in `find -name CMakeLists.txt` ; do
6     d=`dirname $cmake`
7   
8     echo;echo "Directory $d"
9   
10     grep add_executable $cmake |\
11       sed -e 's/ #/#/' -e 's/ *add_executable(//' -e 's/ .*//'|\
12       sed -e 's/^\([^#].*\)/\1 PASS/' -e 's/^#\(.*\)/\1 todo/' |\
13       sed -e "s|^|$d/|" -e "s|^\\./||" | \
14       tee >(sed -e 's/[^ ]* //'|sort|uniq -c|sed -e "s|^ *|Summary: |") |\
15       cat
16
17   done
18 }
19
20 explore_files
21
22 echo; echo "----------------------------"
23
24 echo -n "Total amount of passed tests:  "
25 (echo 0; explore_files | grep Summary: |grep PASS|\
26   sed 's/Summary: \([0-9]*\) .*/\1 +/';echo p)  | dc
27
28 echo -n "Total amount of failed tests:  "
29 (echo 0; explore_files | grep Summary: |grep todo|\
30   sed 's/Summary: \([0-9]*\) .*/\1 +/';echo p)  | dc