mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
tests: check_logs: improve error message (#10887)
Before: [ ERROR ] test/functional/helpers.lua @ 812: after_each test/helpers.lua:156: assertion failed! stack traceback: test/helpers.lua:156: in function 'check_logs' test/functional/helpers.lua:816: in function <test/functional/helpers.lua:812>
This commit is contained in:
parent
7d53887352
commit
4b8a16153e
@ -124,7 +124,7 @@ end
|
||||
|
||||
function module.check_logs()
|
||||
local log_dir = os.getenv('LOG_DIR')
|
||||
local runtime_errors = 0
|
||||
local runtime_errors = {}
|
||||
if log_dir and lfs.attributes(log_dir, 'mode') == 'directory' then
|
||||
for tail in lfs.dir(log_dir) do
|
||||
if tail:sub(1, 30) == 'valgrind-' or tail:find('san%.') then
|
||||
@ -148,12 +148,14 @@ function module.check_logs()
|
||||
out:write(start_msg .. '\n')
|
||||
out:write('= ' .. table.concat(lines, '\n= ') .. '\n')
|
||||
out:write(select(1, start_msg:gsub('.', '=')) .. '\n')
|
||||
runtime_errors = runtime_errors + 1
|
||||
table.insert(runtime_errors, file)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
assert(0 == runtime_errors)
|
||||
assert(0 == #runtime_errors, string.format(
|
||||
'Found runtime errors in logfile(s): %s',
|
||||
table.concat(runtime_errors, ', ')))
|
||||
end
|
||||
|
||||
-- Tries to get platform name from $SYSTEM_NAME, uname; fallback is "Windows".
|
||||
|
Loading…
Reference in New Issue
Block a user