install valgrind (can we?) and check for it when runnign tests

This commit is contained in:
Enno Rehling 2015-08-05 18:14:57 +02:00
parent 75235a11fc
commit 487aaede16
2 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,7 @@ addons:
- libncurses5-dev - libncurses5-dev
- libsqlite3-dev - libsqlite3-dev
- libxml2-dev - libxml2-dev
- valgrind
os: os:
- linux - linux
- osx - osx

View File

@ -19,7 +19,13 @@ done
cd $ROOT/tests cd $ROOT/tests
setup setup
cleanup cleanup
valgrind ../Debug/eressea/eressea -t 184 ../scripts/reports.lua VALGRIND=`which valgrind`
SERVER=../Debug/eressea/eressea
if [ -n "$VALGRIND" ]; then
SERVER="$VALGRIND $SERVER"
fi
echo "running $SERVER"
$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"