Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Little script to report on our MPICH3 coverage
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 3 Jul 2014 08:12:33 +0000 (10:12 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 3 Jul 2014 08:13:44 +0000 (10:13 +0200)
CMakeLists.txt files are used as a source of information.
I had to slightly change one of them to make it easier to parse.

teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt
teshsuite/smpi/mpich3-test/generate_report [new file with mode: 0755]

index 8145098..90782d4 100644 (file)
@@ -15,7 +15,7 @@ if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
 
   add_executable(allpairf allpairf.f)
 #  add_executable(greqf greqf.f dummyf.f)
 
   add_executable(allpairf allpairf.f)
 #  add_executable(greqf greqf.f dummyf.f)
-  #add_executable(mprobef mprobef.f)
+#  add_executable(mprobef mprobef.f)
   add_executable(statusesf statusesf.f)
 
   target_link_libraries(allpairf simgrid mtest_f77)
   add_executable(statusesf statusesf.f)
 
   target_link_libraries(allpairf simgrid mtest_f77)
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