diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-30 08:26:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-30 08:26:55 +0200 |
commit | 4b8a16153e79644a5df9f6dc94215ac009c26c33 (patch) | |
tree | 81697152f95c2f734e54026b5bb205621253c75d | |
parent | 7d5388735239ebda0359bfd3947d767ca38a2a82 (diff) | |
download | rneovim-4b8a16153e79644a5df9f6dc94215ac009c26c33.tar.gz rneovim-4b8a16153e79644a5df9f6dc94215ac009c26c33.tar.bz2 rneovim-4b8a16153e79644a5df9f6dc94215ac009c26c33.zip |
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>
-rw-r--r-- | test/helpers.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index b571085b4e..08a7822b19 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -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". |