From: Petr Špaček Date: Wed, 8 Jul 2020 12:44:59 +0000 (+0200) Subject: tests: verbose stack traces from config tests X-Git-Tag: v5.2.1~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1353dc2f89ae08a7bb67d3fa0e969dec5f568c5;p=thirdparty%2Fknot-resolver.git tests: verbose stack traces from config tests --- diff --git a/tests/config/test_utils.lua b/tests/config/test_utils.lua index 15a14520f..5a7f3111b 100644 --- a/tests/config/test_utils.lua +++ b/tests/config/test_utils.lua @@ -2,10 +2,9 @@ local M = {} function M.test(f, ...) - local res, exception = pcall(f, ...) + local res, exception = xpcall(f, debug.traceback, ...) if not res then - local trace = debug.getinfo(2) - io.stderr:write(string.format('%s:%d %s\n', trace.source, trace.currentline, exception)) + io.stderr:write(string.format('%s\n', exception)) os.exit(2) end return res