forked from github/server
Merge pull request #5 from ennorehling/feature/travis-valgrind-cr
check that the CR contains reasonable entries
This commit is contained in:
commit
2e099ad3a6
|
@ -16,3 +16,5 @@ s/build
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
inifile
|
inifile
|
||||||
s/runtests
|
s/runtests
|
||||||
|
cd tests
|
||||||
|
./write-reports.sh
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
cleanup () {
|
||||||
|
rm -rf reports score
|
||||||
|
}
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
ln -sf ../scripts/config.lua
|
||||||
|
}
|
||||||
|
|
||||||
|
quit() {
|
||||||
|
test -n "$2" && echo $2
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
ROOT=`pwd`
|
||||||
|
while [ ! -d $ROOT/.git ]; do
|
||||||
|
ROOT=`dirname $ROOT`
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $ROOT/tests
|
||||||
|
setup
|
||||||
|
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 REGION reports/$CRFILE || quit 2 "CR did not contain any regions"
|
||||||
|
grep -q EINHEIT reports/$CRFILE || quit 3 "CR did not contain any units"
|
||||||
|
echo "integration tests: PASS"
|
||||||
|
cleanup
|
Loading…
Reference in New Issue