Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Little script to report on our MPICH3 coverage
[simgrid.git] / teshsuite / smpi / mpich3-test / generate_report
diff --git a/teshsuite/smpi/mpich3-test/generate_report b/teshsuite/smpi/mpich3-test/generate_report
new file mode 100755 (executable)
index 0000000..ac33562
--- /dev/null
@@ -0,0 +1,30 @@
+#! /bin/bash
+
+explore_files() {
+
+  for cmake in `find -name CMakeLists.txt` ; do
+    d=`dirname $cmake`
+  
+    echo;echo "Directory $d"
+  
+    grep add_executable $cmake |\
+      sed -e 's/ #/#/' -e 's/ *add_executable(//' -e 's/ .*//'|\
+      sed -e 's/^\([^#].*\)/\1 PASS/' -e 's/^#\(.*\)/\1 todo/' |\
+      sed -e "s|^|$d/|" -e "s|^\\./||" | \
+      tee >(sed -e 's/[^ ]* //'|sort|uniq -c|sed -e "s|^ *|Summary: |") |\
+      cat
+
+  done
+}
+
+explore_files
+
+echo; echo "----------------------------"
+
+echo -n "Total amount of passed tests:  "
+(echo 0; explore_files | grep Summary: |grep PASS|\
+  sed 's/Summary: \([0-9]*\) .*/\1 +/';echo p)  | dc
+
+echo -n "Total amount of failed tests:  "
+(echo 0; explore_files | grep Summary: |grep todo|\
+  sed 's/Summary: \([0-9]*\) .*/\1 +/';echo p)  | dc