diff --git a/.travis.yml b/.travis.yml index de62c2200..dd3f469ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ addons: - libncurses5-dev - libsqlite3-dev - libxml2-dev + - valgrind os: - linux - osx diff --git a/tests/data/184.dat b/tests/data/184.dat index 74d72258a..ffe368510 100644 Binary files a/tests/data/184.dat and b/tests/data/184.dat differ diff --git a/tests/write-reports.sh b/tests/write-reports.sh index ec120bca8..775fdb622 100755 --- a/tests/write-reports.sh +++ b/tests/write-reports.sh @@ -16,14 +16,25 @@ while [ ! -d $ROOT/.git ]; do ROOT=`dirname $ROOT` done +set -e cd $ROOT/tests setup cleanup -valgrind ../Debug/eressea/eressea -t 184 ../scripts/reports.lua +VALGRIND=`which valgrind` +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" +fi +echo "running $SERVER" +$SERVER -t 184 ../scripts/reports.lua [ -d reports ] || quit 4 "no reports directory created" CRFILE=184-zvto.cr -grep -q FACTION reports/$CRFILE || quit 1 "CR did not contain any factions" +grep -q PARTEI reports/$CRFILE || quit 1 "CR did not contain any factions" grep -q REGION reports/$CRFILE || quit 2 "CR did not contain any regions" -grep -q EINHEIT reports/$CRFILE || quit 3 "CR did not contain any units" +grep -q SCHIFF reports/$CRFILE || quit 3 "CR did not contain any ships" +grep -q BURG reports/$CRFILE || quit 4 "CR did not contain any buildings" +grep -q EINHEIT reports/$CRFILE || quit 5 "CR did not contain any units" +grep -q GEGENSTAENDE reports/$CRFILE || quit 6 "CR did not contain any items" echo "integration tests: PASS" cleanup