test: fail CI if .nvimlog is not empty (#37470)

This will prevent adding passing tests which logs errors in .nvimlog.

Close #28323
Related: https://github.com/neovim/neovim/pull/27660#issuecomment-2035738597

Co-authored-by: dundargoc <gocdundar@gmail.com>
This commit is contained in:
zeertzjq
2026-01-20 20:56:06 +08:00
committed by GitHub
co-authored by dundargoc
parent 6da968dd7f
commit 15b9118ac0
3 changed files with 17 additions and 4 deletions
+9
View File
@@ -99,3 +99,12 @@ if(res)
message(FATAL_ERROR "${TEST_TYPE} tests failed with error: ${res}")
endif()
if(CI_BUILD)
file(SIZE $ENV{NVIM_LOG_FILE} FILE_SIZE)
if(NOT ${FILE_SIZE} MATCHES "^0$")
file(READ $ENV{NVIM_LOG_FILE} out)
message(STATUS "$NVIM_LOG_FILE: $ENV{NVIM_LOG_FILE}\n${out}")
message(FATAL_ERROR "$NVIM_LOG_FILE is not empty")
endif()
endif()