-#!/bin/sh
+#!/usr/bin/env sh
set -e
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"
cd $WORKSPACE/build
-### Proceed with the tests
+### Proceed with the tests
ctest -D ExperimentalStart || true
cmake -Denable_documentation=OFF -Denable_lua=OFF \
-Denable_compile_optimizations=OFF -Denable_compile_warnings=ON \
-Denable_jedule=OFF -Denable_mallocators=OFF \
- -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON -Denable_model-checking=OFF \
+ -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF -Denable_model-checking=OFF \
-Denable_memcheck_xml=ON $WORKSPACE
-make -j$NUMPROC
-ctest -D ExperimentalTest -j$NUMPROC || 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 \;
#remove all "empty" files
- pcregrep -r -l -M "status\>\n\n\<errorcounts" $WORKSPACE/memcheck/* | xargs rm -f
- mv Testing/`head -n 1 < Testing/TAG`/Test.xml $WORKSPACE/DynamicAnalysis.xml
+ grep -r -L "error>" $WORKSPACE/memcheck | xargs rm -f
+ mv Testing/$(head -n 1 < Testing/TAG)/Test.xml $WORKSPACE/DynamicAnalysis.xml
fi