server/s/travis-build

53 lines
985 B
Plaintext
Raw Permalink Normal View History

2014-10-14 22:11:49 +02:00
#!/bin/sh
ROOT=`pwd`
2014-10-14 23:22:02 +02:00
inifile() {
cd $ROOT
2014-10-14 23:18:01 +02:00
if [ ! -e eressea.ini ]; then
cp conf/eressea.ini .
2021-02-14 18:51:57 +01:00
$BUILD/tools/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
2016-10-03 16:16:17 +02:00
integration_tests() {
cd tests
./write-reports.sh
./run-turn.sh
}
cppcheck_tests() {
cppcheck --version
DIRS="util kernel modules races attributes triggers items tools spells"
IGNORE=""
for DIR in $DIRS ; do
IGNORE="$IGNORE -i src/$DIR"
echo "cppcheck src/$DIR"
cppcheck --quiet -Isrc -Iclibs -Istorage -IcJSON --error-exitcode=1 "src/$DIR"
done
echo "cppcheck src"
cppcheck --quiet -Isrc -Iclibs -Istorage -IcJSON --error-exitcode=1 $IGNORE src
}
2015-08-16 19:55:11 +02:00
set -e
2015-07-11 23:25:09 +02:00
[ -z $BUILD ] && BUILD=Debug ; export BUILD
2017-12-31 20:47:40 +01:00
# cppcheck_tests
2018-09-29 09:58:23 +02:00
s/cmake-init --db=sqlite
2019-01-22 16:17:16 +01:00
cd Debug
scan-build make
cd ../process
2017-12-08 19:26:26 +01:00
make
cd $ROOT
inifile
2021-02-22 20:08:30 +01:00
luarocks install lunitx --local
eval $(luarocks path)
2021-02-22 20:50:49 +01:00
export LUA_PATH="$ROOT/scripts/?.lua;$LUA_PATH"
echo $LUA_PATH
if [ -e /usr/bin/valgrind ]; then
s/runtests -V
else
s/runtests
fi
2016-10-03 16:16:17 +02:00
integration_tests
2021-02-22 20:08:30 +01:00