X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/88fad0aaff9eb463f048bfdfe4ad6218aba44ddb..54760fdf933a7a8b677994fef3254f5fc943e05f:/tools/jenkins/Sanitizers.sh diff --git a/tools/jenkins/Sanitizers.sh b/tools/jenkins/Sanitizers.sh index 353299dca0..985042ffcd 100755 --- a/tools/jenkins/Sanitizers.sh +++ b/tools/jenkins/Sanitizers.sh @@ -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,12 +18,12 @@ fi if [ "${SANITIZER}" = "address" ] then + export ASAN_OPTIONS="suppressions=$WORKSPACE/tools/address_sanitizer.supp" SANITIZER_OPTIONS="-Denable_address_sanitizer=ON -Denable_undefined_sanitizer=OFF -Denable_thread_sanitizer=OFF" elif [ "${SANITIZER}" = "thread" ] then - export TSAN_OPTIONS="memory_limit_mb=1500" + export TSAN_OPTIONS="memory_limit_mb=1500 suppressions=$WORKSPACE/tools/thread_sanitizer.supp" SANITIZER_OPTIONS="-Denable_address_sanitizer=OFF -Denable_undefined_sanitizer=OFF -Denable_thread_sanitizer=ON" - export SMPI_PRIVATIZATION="mmap" # TSAN don't play well with dlopen elif [ "${SANITIZER}" = "undefined" ] then export UBSAN_OPTIONS="print_stacktrace=1" @@ -46,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 @@ -79,9 +79,9 @@ 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 +make -j$NUMPROC tests ctest --no-compress-output -D ExperimentalTest || true if [ -f Testing/TAG ] ; then