From e1353dc2f89ae08a7bb67d3fa0e969dec5f568c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= <petr.spacek@nic.cz> Date: Wed, 8 Jul 2020 14:44:59 +0200 Subject: [PATCH] tests: verbose stack traces from config tests --- tests/config/test_utils.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 -- GitLab