Merge pull request #6 from ennorehling/feature/travis-valgrind-cr

additional valgrind-check stuff
This commit is contained in:
Enno Rehling 2015-08-05 18:26:59 +02:00
commit ea783da45c
3 changed files with 15 additions and 3 deletions

View File

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

Binary file not shown.

View File

@ -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