try to locate zlib valgrind problem on the travis boxen.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577135
use set -e to terminate when any part of the build fails
This commit is contained in:
Enno Rehling 2015-05-21 17:29:13 +02:00
parent f29d573c3e
commit ac01d33cd2
2 changed files with 41 additions and 11 deletions

View File

@ -5,7 +5,7 @@ compiler:
script: s/travis-build
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind
- sudo apt-get install -qq zlib1g-dev libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev valgrind
os:
- linux
- osx

View File

@ -1,31 +1,61 @@
#!/bin/sh
set -e
ROOT=`pwd`
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"
BUILD="$ROOT/build-$MACHINE-$CC-Debug"
inifile() {
cd $ROOT
if [ ! -e eressea.ini ]; then
cp conf/eressea.ini .
$BUILD/iniparser/inifile eressea.ini add lua:paths lunit:scripts
fi
}
build() {
cd $BUILD
cmake -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules -DCMAKE_BUILD_TYPE=Debug ..
make
}
test_valgrind_report () {
cd tests
ln -sf ../scripts/config.lua
valgrind ../$BUILD/eressea/eressea -v0 -t184 ../scripts/reports.lua
valgrind $BUILD/eressea/eressea -v0 -t184 ../scripts/reports.lua
}
test_unittests() {
$BUILD/eressea/test_eressea
}
cleanup() {
cd $ROOT/tests
rm -rf reports score eressea.log* config.lua
}
test_server() {
cd $ROOT
inifile
$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
}
# information
echo "* base directory: $ROOT"
echo "* build directory: $BUILD"
echo "* zlib1g-dev package:"
dpkg -l zlib1g-dev
echo
# build the code
[ -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 &&
build
test_unittests
test_server
test_valgrind_report
cleanup