aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-24 18:12:55 +0200
committerGitHub <noreply@github.com>2019-07-24 18:12:55 +0200
commit431cf56e2f5fd5a389bda481122ac62655d9193c (patch)
tree8bf4e0094348906ee52ff71e1eb8c0cd5793a933 /test/helpers.lua
parent06547cdfc00c4a9c47ef7ea30412b2925816786f (diff)
downloadrneovim-431cf56e2f5fd5a389bda481122ac62655d9193c.tar.gz
rneovim-431cf56e2f5fd5a389bda481122ac62655d9193c.tar.bz2
rneovim-431cf56e2f5fd5a389bda481122ac62655d9193c.zip
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
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 0887bbb8a5..5739b42fe6 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -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