fix travis build writing reports with valgrind

This commit is contained in:
Enno Rehling 2015-05-21 16:30:14 +02:00
parent f69d46404c
commit f29d573c3e
1 changed files with 20 additions and 8 deletions

View File

@ -1,19 +1,31 @@
#!/bin/sh
MACHINE=`uname -m`
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
BUILD="build-$MACHINE-$CC-Debug"
inifile() {
if [ ! -e eressea.ini ]; then
cp conf/eressea.ini .
build/iniparser/inifile eressea.ini add lua:paths lunit:scripts
$BUILD/iniparser/inifile eressea.ini add lua:paths lunit:scripts
fi
}
[ -d build ] || mkdir build
cd build && cmake .. \
test_valgrind_report () {
cd tests
ln -sf ../scripts/config.lua
valgrind ../$BUILD/eressea/eressea -v0 -t184 ../scripts/reports.lua
}
[ -d $BUILD ] || mkdir $BUILD
cd $BUILD && cmake .. \
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \
-DCMAKE_BUILD_TYPE=Debug .. && \
make && cd .. && inifile &&
build/eressea/test_eressea &&
build/eressea/eressea -v0 scripts/run-tests.lua &&
build/eressea/eressea -v0 scripts/run-tests-e2.lua &&
build/eressea/eressea -v0 scripts/run-tests-e3.lua &&
(cd tests ; valgrind ../build/eressea/eressea -v0 -t184 ../scripts/reports.lua )
$BUILD/eressea/test_eressea &&
$BUILD/eressea/eressea -v0 scripts/run-tests.lua &&
$BUILD/eressea/eressea -v0 scripts/run-tests-e2.lua &&
$BUILD/eressea/eressea -v0 scripts/run-tests-e3.lua &&
test_valgrind_report