tests/_runner.lua: use xpcall+traceback with step error handler

This commit is contained in:
Daniel Hahler 2015-07-13 22:50:04 +02:00
parent dc9295d981
commit 22624284a2
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ runner.run_steps = function(steps)
local step_as_string = step..'/'..#steps..' (@'..step_count..')'
-- Call the current step's function.
local success, result = pcall(steps[step], step_count)
local success, result = xpcall(function()
return steps[step](step_count)
end, debug.traceback)
if not success then
io.stderr:write('Error: running function for step '