valgrind the unit tests for good measure

This commit is contained in:
Enno Rehling 2015-11-07 18:04:11 +01:00
parent 2f8dc29396
commit d780988862
1 changed files with 5 additions and 2 deletions

View File

@ -21,13 +21,16 @@ cd $ROOT/tests
setup
cleanup
VALGRIND=`which valgrind`
TESTS=../Debug/eressea/test_eressea
SERVER=../Debug/eressea/eressea
if [ -n "$VALGRIND" ]; then
SUPP=../share/ubuntu-12_04.supp
SERVER="$VALGRIND --suppressions=$SUPP --error-exitcode=1 --leak-check=no $SERVER"
VALGRIND="$VALGRIND --suppressions=$SUPP --error-exitcode=1 --leak-check=no"
fi
echo "running $TESTS"
$VALGRIND $TESTS
echo "running $SERVER"
$SERVER -t 184 ../scripts/reports.lua
$VALGRIND $SERVER -t 184 ../scripts/reports.lua
[ -d reports ] || quit 4 "no reports directory created"
CRFILE=184-zvto.cr
grep -q PARTEI reports/$CRFILE || quit 1 "CR did not contain any factions"