server/scripts/run-tests.lua
Enno Rehling 2529a781d8 fix lunit
2020-04-30 20:01:02 +02:00

17 lines
691 B
Lua

-- Basic test without loading XML Config. Test care about needed settings.
-- Tests are under scripts/test/ and all files must be in scripts/test/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 form 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'
lunit = require 'lunit'
require 'eressea'
require 'eressea.path'
require 'tests'
result = lunit.main()
return result.errors + result.failed