tests/_runner.lua: use xpcall+traceback with step error handler
This commit is contained in:
parent
dc9295d981
commit
22624284a2
|
@ -29,7 +29,9 @@ runner.run_steps = function(steps)
|
||||||
local step_as_string = step..'/'..#steps..' (@'..step_count..')'
|
local step_as_string = step..'/'..#steps..' (@'..step_count..')'
|
||||||
|
|
||||||
-- Call the current step's function.
|
-- 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
|
if not success then
|
||||||
io.stderr:write('Error: running function for step '
|
io.stderr:write('Error: running function for step '
|
||||||
|
|
Loading…
Reference in New Issue