2014-04-12 05:25:21 +02:00
|
|
|
#!/bin/bash
|
2015-05-21 17:44:36 +02:00
|
|
|
set -e
|
|
|
|
|
2017-01-30 10:26:08 +01:00
|
|
|
ROOT=$(git rev-parse --show-toplevel)
|
2015-07-11 23:25:09 +02:00
|
|
|
[ -z $BUILD ] && BUILD=Debug ; export BUILD
|
2014-04-12 05:25:21 +02:00
|
|
|
|
2017-10-10 21:30:53 +02:00
|
|
|
UNIT_TESTS=$BUILD/eressea/test_eressea
|
|
|
|
RUN_TESTS=$BUILD/eressea/eressea
|
|
|
|
if [ "$1" = "-V" ]; then
|
|
|
|
VALGRIND=$(which valgrind)
|
|
|
|
if [ -n "$VALGRIND" ]; then
|
|
|
|
SUPP=share/ubuntu-12_04.supp
|
|
|
|
UNIT_TESTS="$VALGRIND --quiet --suppressions=$SUPP --error-exitcode=1 --leak-check=no $UNIT_TESTS"
|
|
|
|
RUN_TESTS="$VALGRIND --quiet --suppressions=$SUPP --error-exitcode=1 --leak-check=no $RUN_TESTS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-07-11 23:25:09 +02:00
|
|
|
if [ ! -e $ROOT/$BUILD ]; then
|
|
|
|
echo "cannot find build directory $BUILD in $ROOT. did you run cmake-init?"
|
2014-04-12 05:25:21 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2017-10-10 21:30:53 +02:00
|
|
|
$UNIT_TESTS
|
2014-06-14 02:35:43 +02:00
|
|
|
cd $ROOT
|
2014-12-11 11:22:14 +01:00
|
|
|
[ -e eressea.ini ] || ln -sf conf/eressea.ini
|
2017-10-10 21:30:53 +02:00
|
|
|
$RUN_TESTS -v1 scripts/run-tests.lua
|
|
|
|
$RUN_TESTS -v1 scripts/run-tests-e2.lua
|
|
|
|
$RUN_TESTS -v1 scripts/run-tests-e3.lua
|
|
|
|
$RUN_TESTS --version
|
2016-09-16 16:54:41 +02:00
|
|
|
rm -rf data reports orders.txt score score.alliances datum turn
|
2015-05-21 13:18:52 +02:00
|
|
|
|
2014-07-03 06:35:16 +02:00
|
|
|
cd $OLDWPD
|