From 87e445c8ad7a9508d561eaf510314d1822a4fe54 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 3 Jul 2014 10:12:33 +0200 Subject: [PATCH] Little script to report on our MPICH3 coverage CMakeLists.txt files are used as a source of information. I had to slightly change one of them to make it easier to parse. --- .../smpi/mpich3-test/f77/pt2pt/CMakeLists.txt | 2 +- teshsuite/smpi/mpich3-test/generate_report | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 teshsuite/smpi/mpich3-test/generate_report diff --git a/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt b/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt index 81450984d3..90782d45e3 100644 --- a/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt +++ b/teshsuite/smpi/mpich3-test/f77/pt2pt/CMakeLists.txt @@ -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(mprobef mprobef.f) +# add_executable(mprobef mprobef.f) 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 index 0000000000..ac33562311 --- /dev/null +++ b/teshsuite/smpi/mpich3-test/generate_report @@ -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 -- 2.20.1