X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/49637c6fbea1f5e16060fcceb844a637f50869ed..9154f5e4e00fdd0ed3ea750235f245f85b813b18:/tools/jenkins/DynamicAnalysis.sh diff --git a/tools/jenkins/DynamicAnalysis.sh b/tools/jenkins/DynamicAnalysis.sh index fae9f4062d..e28143ccc2 100755 --- a/tools/jenkins/DynamicAnalysis.sh +++ b/tools/jenkins/DynamicAnalysis.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh set -e @@ -7,44 +7,46 @@ die() { exit 1 } -do_cleanup() { - for d in "$WORKSPACE/build" "$WORKSPACE/memcheck" +### Check the node installation + +pkg_check() { + for pkg do - if [ -d "$d" ] + if command -v $pkg then - rm -rf "$d" || die "Could not remote $d" + echo "$pkg is installed. Good." + else + die "please install $pkg before proceeding" fi done - find $WORKSPACE -name "memcheck_test_*.memcheck" -exec rm {} \; } -### Check the node installation - -for pkg in valgrind -do - if command -v $pkg - then - echo "$pkg is installed. Good." - else - die "please install $pkg before proceeding" - fi -done +pkg_check valgrind pcregrep -### Cleanup previous runs +### Cleanup previous runs ! [ -z "$WORKSPACE" ] || die "No WORKSPACE" [ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist" -do_cleanup +do_cleanup() { + for d + do + if [ -d "$d" ] + then + rm -rf "$d" || die "Could not remove $d" + fi + mkdir "$d" || die "Could not create $d" + done + find $WORKSPACE -name "memcheck_test_*.memcheck" -exec rm {} \; +} -for d in "$WORKSPACE/build" "$WORKSPACE/memcheck" -do - mkdir "$d" || die "Could not create $d" -done +do_cleanup "$WORKSPACE/build" "$WORKSPACE/memcheck" + +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 ExperimentalMemCheck || true + +make -j$NUMPROC tests +ctest --no-compress-output -D ExperimentalTest -j$NUMPROC || true cd $WORKSPACE/build if [ -f Testing/TAG ] ; then - find . -iname "*.memcheck" -exec mv {} $WORKSPACE/memcheck \; - mv Testing/`head -n 1 < Testing/TAG`/DynamicAnalysis.xml $WORKSPACE + find $WORKSPACE -iname "*.memcheck" -exec mv {} $WORKSPACE/memcheck \; + #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