mirror of
https://github.com/neovim/neovim.git
synced 2026-08-19 02:24:46 -05:00
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:
@@ -99,3 +99,12 @@ if(res)
|
|||||||
|
|
||||||
message(FATAL_ERROR "${TEST_TYPE} tests failed with error: ${res}")
|
message(FATAL_ERROR "${TEST_TYPE} tests failed with error: ${res}")
|
||||||
endif()
|
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()
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ describe('jobs', function()
|
|||||||
vim.v.progpath,
|
vim.v.progpath,
|
||||||
'--clean',
|
'--clean',
|
||||||
'--headless',
|
'--headless',
|
||||||
'+lua print(vim.uv.new_tty(1, false):get_winsize())',
|
'+lua tty = vim.uv.new_tty(1, false) print(tty:get_winsize()) tty:close()',
|
||||||
}, {
|
}, {
|
||||||
term = true,
|
term = true,
|
||||||
width = 11,
|
width = 11,
|
||||||
|
|||||||
@@ -2804,6 +2804,7 @@ describe('TUI', function()
|
|||||||
it('with non-tty (pipe) stdout/stderr', function()
|
it('with non-tty (pipe) stdout/stderr', function()
|
||||||
finally(function()
|
finally(function()
|
||||||
os.remove('testF')
|
os.remove('testF')
|
||||||
|
os.remove(testlog)
|
||||||
end)
|
end)
|
||||||
local screen = tt.setup_screen(
|
local screen = tt.setup_screen(
|
||||||
0,
|
0,
|
||||||
@@ -2811,16 +2812,19 @@ describe('TUI', function()
|
|||||||
nvim_prog
|
nvim_prog
|
||||||
),
|
),
|
||||||
nil,
|
nil,
|
||||||
{ VIMRUNTIME = os.getenv('VIMRUNTIME') }
|
{ VIMRUNTIME = os.getenv('VIMRUNTIME'), NVIM_LOG_FILE = testlog }
|
||||||
)
|
)
|
||||||
feed_data(':w testF\n:q\n')
|
feed_data(':w testF\n:q\n')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
:w testF |
|
:w testF |
|
||||||
:q |
|
:q |
|
||||||
^ |
|
abc |
|
||||||
|*3
|
|
|
||||||
|
[Process exited 0]^ |
|
||||||
|
|
|
||||||
{5:-- TERMINAL --} |
|
{5:-- TERMINAL --} |
|
||||||
]])
|
]])
|
||||||
|
assert_log('TUI: timed out waiting for DA1 response', testlog)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('<C-h> #10134', function()
|
it('<C-h> #10134', function()
|
||||||
|
|||||||
Reference in New Issue
Block a user