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

View file

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