2014-10-14 22:11:49 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-05-21 16:30:14 +02:00
|
|
|
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"
|
|
|
|
|
2014-10-14 23:22:02 +02:00
|
|
|
inifile() {
|
2014-10-14 23:18:01 +02:00
|
|
|
if [ ! -e eressea.ini ]; then
|
|
|
|
cp conf/eressea.ini .
|
2015-05-21 16:30:14 +02:00
|
|
|
$BUILD/iniparser/inifile eressea.ini add lua:paths lunit:scripts
|
2014-10-14 23:18:01 +02:00
|
|
|
fi
|
2014-10-14 23:22:02 +02:00
|
|
|
}
|
2014-10-14 23:18:01 +02:00
|
|
|
|
2015-05-21 16:30:14 +02:00
|
|
|
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 .. \
|
2014-10-14 22:11:49 +02:00
|
|
|
-DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug .. && \
|
2014-10-14 23:22:02 +02:00
|
|
|
make && cd .. && inifile &&
|
2015-05-21 16:30:14 +02:00
|
|
|
$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
|