server/scripts/run-tests-e2.lua
Enno Rehling 88f454e1f7 failed tests abort runtests and return an error code
small test world for (future) valgrind tests.
2015-05-21 08:29:22 +02:00

22 lines
765 B
Lua

-- Tests that work in all games. With game config of E2.
-- Tests are under scripts/test/e2 and all files must be in scripts/test/e2/init.lua
path = 'scripts'
if config.install then
path = config.install .. '/' .. path
package.path = package.path .. ';' .. config.install .. '/lunit/?.lua'
--needed to find lunit if not run from eressea root. Needs right [lua] install setting in eressea.ini (point to eressea root from the start folder)
end
package.path = package.path .. ';' .. path .. '/?.lua;' .. path .. '/?/init.lua'
config.rules = 'e2'
require 'eressea'
require 'eressea.xmlconf'
require 'eressea.path'
require 'tests.e2'
require 'lunit'
rules = require('eressea.' .. config.rules)
result = lunit.main()
return result.errors + result.failed