From 75235a11fc470d0e337ef132534b4f5032b2be0a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 5 Aug 2015 18:03:43 +0200 Subject: [PATCH 1/3] update test data to include ships and buildings --- tests/data/184.dat | Bin 7702 -> 7773 bytes tests/write-reports.sh | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/data/184.dat b/tests/data/184.dat index 74d72258a256f2c8b3f00c0208058e83d1ff5d92..ffe368510a226707f8cc399f4618e898a433fd55 100644 GIT binary patch delta 142 zcmbPcbJvD5nvsEliGhKEaU(C<>ddb% s=udvnp~Mf=%fP|z806&Y8RE*|xS5N`nsc(dIN#*QtU{Zoh&FKm0K}^*@&Et; delta 83 zcmca>GtGuGnvsEli2(>Ua&G5lW?*2P{EJ(4vH+*{=1v|XPAvx3;)2ZNR94ok)bi9E mX4c%wqM{5Y=KRbY7M9}7oNQ+H%)I2(yy8@*&D%tma{vHZn-;17 diff --git a/tests/write-reports.sh b/tests/write-reports.sh index ec120bca8..8927ea693 100755 --- a/tests/write-reports.sh +++ b/tests/write-reports.sh @@ -22,8 +22,11 @@ cleanup valgrind ../Debug/eressea/eressea -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 From 487aaede16aa3960817fb0a617660b8fcba9c733 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 5 Aug 2015 18:14:57 +0200 Subject: [PATCH 2/3] install valgrind (can we?) and check for it when runnign tests --- .travis.yml | 1 + tests/write-reports.sh | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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/write-reports.sh b/tests/write-reports.sh index 8927ea693..eb42663fe 100755 --- a/tests/write-reports.sh +++ b/tests/write-reports.sh @@ -19,7 +19,13 @@ done 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 +SERVER="$VALGRIND $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 PARTEI reports/$CRFILE || quit 1 "CR did not contain any factions" From 47ff4ca9dd9a34baf5aab4848839b98fc2d23819 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 5 Aug 2015 18:19:17 +0200 Subject: [PATCH 3/3] use suppression file for old ubuntu --- tests/write-reports.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/write-reports.sh b/tests/write-reports.sh index eb42663fe..775fdb622 100755 --- a/tests/write-reports.sh +++ b/tests/write-reports.sh @@ -16,13 +16,15 @@ while [ ! -d $ROOT/.git ]; do ROOT=`dirname $ROOT` done +set -e cd $ROOT/tests setup cleanup VALGRIND=`which valgrind` SERVER=../Debug/eressea/eressea if [ -n "$VALGRIND" ]; then -SERVER="$VALGRIND $SERVER" +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