forked from github/server
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:
parent
f29d573c3e
commit
ac01d33cd2
|
@ -5,7 +5,7 @@ compiler:
|
||||||
script: s/travis-build
|
script: s/travis-build
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- 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:
|
os:
|
||||||
- linux
|
- linux
|
||||||
- osx
|
- osx
|
||||||
|
|
|
@ -1,31 +1,61 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
ROOT=`pwd`
|
||||||
MACHINE=`uname -m`
|
MACHINE=`uname -m`
|
||||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||||
BUILD="build-$MACHINE-$CC-Debug"
|
BUILD="$ROOT/build-$MACHINE-$CC-Debug"
|
||||||
|
|
||||||
inifile() {
|
inifile() {
|
||||||
|
cd $ROOT
|
||||||
if [ ! -e eressea.ini ]; then
|
if [ ! -e eressea.ini ]; then
|
||||||
cp conf/eressea.ini .
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd $BUILD
|
||||||
|
cmake -DCMAKE_MODULE_PATH=$ROOT/cmake/Modules -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
test_valgrind_report () {
|
test_valgrind_report () {
|
||||||
cd tests
|
cd tests
|
||||||
ln -sf ../scripts/config.lua
|
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
|
[ -d $BUILD ] || mkdir $BUILD
|
||||||
cd $BUILD && cmake .. \
|
build
|
||||||
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \
|
test_unittests
|
||||||
-DCMAKE_BUILD_TYPE=Debug .. && \
|
test_server
|
||||||
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 &&
|
|
||||||
test_valgrind_report
|
test_valgrind_report
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
Loading…
Reference in New Issue