failed tests abort runtests and return an error code

small test world for (future) valgrind tests.
This commit is contained in:
Enno Rehling 2015-05-21 08:27:07 +02:00
parent 657c621582
commit 88f454e1f7
7 changed files with 25 additions and 6 deletions

View File

@ -18,7 +18,7 @@ fi
$ROOT/$BIN_DIR/eressea/test_eressea $ROOT/$BIN_DIR/eressea/test_eressea
cd $ROOT cd $ROOT
[ -e eressea.ini ] || ln -sf conf/eressea.ini [ -e eressea.ini ] || ln -sf conf/eressea.ini
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests.lua $ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests.lua || exit $?
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e2.lua $ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e2.lua || exit $?
$ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e3.lua $ROOT/$BIN_DIR/eressea/eressea -v0 scripts/run-tests-e3.lua || exit $?
cd $OLDWPD cd $OLDWPD

View File

@ -19,4 +19,4 @@ require 'lunit'
rules = require('eressea.' .. config.rules) rules = require('eressea.' .. config.rules)
result = lunit.main() result = lunit.main()
return result.errors return result.errors + result.failed

View File

@ -20,4 +20,4 @@ require 'lunit'
eressea.settings.set("rules.alliances", "0") eressea.settings.set("rules.alliances", "0")
rules = require('eressea.' .. config.rules) rules = require('eressea.' .. config.rules)
result = lunit.main() result = lunit.main()
return result.errors return result.errors + result.failed

View File

@ -14,4 +14,4 @@ require 'eressea.path'
require 'tests' require 'tests'
require 'lunit' require 'lunit'
result = lunit.main() result = lunit.main()
return result.errors return result.errors + result.failed

BIN
tests/data/184.dat Normal file

Binary file not shown.

19
tests/eressea.ini Normal file
View File

@ -0,0 +1,19 @@
[eressea]
base = .
report = reports
verbose = 0
lomem = 0
debug = 0
memcheck = 0
locales = de,en
[lua]
install = ..
paths = lunit:scripts
maxnmrs = 20
rules = e2
[editor]
color = 1

0
tests/orders.184 Normal file
View File