diff options
author | James McCoy <jamessan@jamessan.com> | 2020-09-06 12:09:36 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2020-09-06 12:09:36 -0400 |
commit | 83a7b1b5db99be8017dfd4f84d995035dd3b414e (patch) | |
tree | 7cf347c57887b4db468b0b8374a4176347b36eab /test/helpers.lua | |
parent | 33bf6f9ada84b9bb143cc8864461afec249c27bf (diff) | |
download | rneovim-83a7b1b5db99be8017dfd4f84d995035dd3b414e.tar.gz rneovim-83a7b1b5db99be8017dfd4f84d995035dd3b414e.tar.bz2 rneovim-83a7b1b5db99be8017dfd4f84d995035dd3b414e.zip |
test/helpers: Run $SYMBOLIZER to decode sanitizer logs, if it is set
Diffstat (limited to 'test/helpers.lua')
-rw-r--r-- | test/helpers.lua | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index 40b93d9935..7817345617 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -200,14 +200,25 @@ function module.check_logs() end end fd:close() - os.remove(file) if #lines > 0 then + local status, f local out = io.stdout + if os.getenv('SYMBOLIZER') then + status, f = pcall(module.popen_r, os.getenv('SYMBOLIZER'), '-l', file) + end out:write(start_msg .. '\n') - out:write('= ' .. table.concat(lines, '\n= ') .. '\n') + if status then + for line in f:lines() do + out:write('= '..line..'\n') + end + f:close() + else + out:write('= ' .. table.concat(lines, '\n= ') .. '\n') + end out:write(select(1, start_msg:gsub('.', '=')) .. '\n') table.insert(runtime_errors, file) end + os.remove(file) end end end |