ci: RunTests: ensure that the logfile gets displayed (#10597)

This is meant to help with test failures where e.g. `busted` itself might
crash or get killed.

Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069
This commit is contained in:
Daniel Hahler
2019-07-24 18:12:55 +02:00
committed by GitHub
parent 06547cdfc0
commit 431cf56e2f
2 changed files with 22 additions and 3 deletions

View File

@@ -682,7 +682,7 @@ function module.isCI()
end
-- Gets the contents of $NVIM_LOG_FILE for printing to the build log.
-- Also removes the file, if the current environment looks like CI.
-- Also moves the file to "${NVIM_LOG_FILE}.displayed" on CI environments.
function module.read_nvim_log()
local logfile = os.getenv('NVIM_LOG_FILE') or '.nvimlog'
local is_ci = module.isCI()
@@ -696,7 +696,7 @@ function module.read_nvim_log()
end
log = log..('-'):rep(78)..'\n'
if is_ci then
os.remove(logfile)
os.rename(logfile, logfile .. '.displayed')
end
return log
end