X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a92d7b716f51a53dea7f59db8524d4add713b910..9154f5e4e00fdd0ed3ea750235f245f85b813b18:/tools/jenkins/Sanitizers.sh diff --git a/tools/jenkins/Sanitizers.sh b/tools/jenkins/Sanitizers.sh index 9d83f58589..2a7719f41b 100755 --- a/tools/jenkins/Sanitizers.sh +++ b/tools/jenkins/Sanitizers.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh set -e @@ -7,16 +7,6 @@ die() { exit 1 } -do_cleanup() { - for d in "$WORKSPACE/build" - do - if [ -d "$d" ] - then - rm -rf "$d" || die "Could not remote $d" - fi - done -} - if [ -z "$1" ] then echo "No Sanitizer type selected - run Address" @@ -28,6 +18,7 @@ fi if [ "${SANITIZER}" = "address" ] then + export ASAN_OPTIONS="suppressions=$WORKSPACE/tools/sanitizers.supp" SANITIZER_OPTIONS="-Denable_address_sanitizer=ON -Denable_undefined_sanitizer=OFF -Denable_thread_sanitizer=OFF" elif [ "${SANITIZER}" = "thread" ] then @@ -45,27 +36,37 @@ fi ### Check the node installation -for pkg in xsltproc -do - if command -v $pkg - then - echo "$pkg is installed. Good." - else - die "please install $pkg before proceeding" - fi -done +pkg_check() { + for pkg + do + if command -v $pkg + then + echo "$pkg is installed. Good." + else + die "please install $pkg before proceeding" + fi + done +} + +pkg_check xsltproc ### 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 +} -for d in "$WORKSPACE/build" -do - mkdir "$d" || die "Could not create $d" -done +do_cleanup "$WORKSPACE/build" NUMPROC="$(nproc)" || NUMPROC=1 @@ -78,13 +79,13 @@ cmake -Denable_documentation=OFF -Denable_lua=ON -Denable_java=OFF \ -Denable_jedule=ON -Denable_mallocators=OFF \ -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=OFF \ -Denable_memcheck=OFF -Denable_memcheck_xml=OFF -Denable_smpi_ISP_testsuite=ON -Denable_coverage=OFF\ - -Denable_fortran=OFF ${SANITIZER_OPTIONS} $WORKSPACE + -Denable_fortran=OFF -Denable_python=OFF ${SANITIZER_OPTIONS} $WORKSPACE -make -j$NUMPROC -ctest -D ExperimentalTest || true +make -j$NUMPROC tests +ctest --no-compress-output -D ExperimentalTest || true if [ -f Testing/TAG ] ; then - xsltproc $WORKSPACE/tools/jenkins/ctest2junit.xsl Testing/`head -n 1 < Testing/TAG`/Test.xml > CTestResults_${SANITIZER}.xml + xsltproc $WORKSPACE/tools/jenkins/ctest2junit.xsl Testing/$(head -n 1 < Testing/TAG)/Test.xml > CTestResults_${SANITIZER}.xml mv CTestResults_${SANITIZER}.xml $WORKSPACE fi