Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
missing spots where we should now build 'tests'
[simgrid.git] / tools / jenkins / DynamicAnalysis.sh
index 9638f76..04fe409 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env sh
 
 set -e
 
@@ -20,17 +20,17 @@ do_cleanup() {
 
 ### Check the node installation
 
-for pkg in valgrind
+for pkg in valgrind pcregrep
 do
    if command -v $pkg
-   then 
+   then
       echo "$pkg is installed. Good."
-   else 
-      die "please install $pkg before proceeding" 
+   else
+      die "please install $pkg before proceeding"
    fi
 done
 
-### Cleanup previous runs
+### Cleanup previous runs
 
 ! [ -z "$WORKSPACE" ] || die "No WORKSPACE"
 [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
@@ -42,9 +42,11 @@ do
   mkdir "$d" || die "Could not create $d"
 done
 
+NUMPROC="$(nproc)" || NUMPROC=1
+
 cd $WORKSPACE/build
 
-### Proceed with the tests
+### Proceed with the tests
 ctest -D ExperimentalStart || true
 
 cmake -Denable_documentation=OFF -Denable_lua=OFF  \
@@ -53,12 +55,15 @@ cmake -Denable_documentation=OFF -Denable_lua=OFF  \
       -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_model-checking=OFF \
       -Denable_memcheck_xml=ON $WORKSPACE
 
-ctest -D ExperimentalBuild -V
-ctest -D ExperimentalTest || true
+
+make -j$NUMPROC tests
+ctest --no-compress-output -D ExperimentalTest -j$NUMPROC || true
 
 cd $WORKSPACE/build
 if [ -f Testing/TAG ] ; then
    find $WORKSPACE -iname "*.memcheck" -exec mv {} $WORKSPACE/memcheck \;
-   mv Testing/`head -n 1 < Testing/TAG`/Test.xml  $WORKSPACE/DynamicAnalysis.xml
+   #remove all "empty" files
+   grep -r -L "error>" $WORKSPACE/memcheck | xargs rm -f
+   mv Testing/$(head -n 1 < Testing/TAG)/Test.xml  $WORKSPACE/DynamicAnalysis.xml
 fi