diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/RunTests.cmake | 10 | ||||
-rw-r--r-- | test/functional/api/server_notifications_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/core/fileio_spec.lua | 10 | ||||
-rw-r--r-- | test/functional/ex_cmds/write_spec.lua | 10 | ||||
-rw-r--r-- | test/functional/plugin/man_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/terminal/ex_terminal_spec.lua | 6 | ||||
-rw-r--r-- | test/helpers.lua | 6 |
8 files changed, 32 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a25e1de8d..34eed2826b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -721,6 +721,7 @@ if(BUSTED_PRG) -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=unit + -DCIRRUS_CI=$ENV{CIRRUS_CI} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${UNITTEST_PREREQS} ${TEST_TARGET_ARGS}) @@ -751,6 +752,7 @@ if(BUSTED_PRG) -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional + -DCIRRUS_CI=$ENV{CIRRUS_CI} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) @@ -766,6 +768,7 @@ if(BUSTED_PRG) -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=benchmark + -DCIRRUS_CI=$ENV{CIRRUS_CI} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${BENCHMARK_PREREQS} ${TEST_TARGET_ARGS}) @@ -783,6 +786,7 @@ if(BUSTED_LUA_PRG) -DTEST_DIR=${CMAKE_CURRENT_SOURCE_DIR}/test -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional + -DCIRRUS_CI=$ENV{CIRRUS_CI} -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake DEPENDS ${FUNCTIONALTEST_PREREQS} ${TEST_TARGET_ARGS}) diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index 2abe29b54b..c3ac5f208e 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -3,8 +3,8 @@ set(ENV{LC_ALL} "en_US.UTF-8") if(POLICY CMP0012) # Avoid policy warning due to CI=true. This is needed even if the main - # project has already set this policy as policy settings are reset when using - # the cmake script mode (-P). + # project has already set this policy as project settings aren't inherited + # when using cmake script mode (-P). cmake_policy(SET CMP0012 NEW) endif() @@ -15,6 +15,12 @@ set(ENV{XDG_DATA_HOME} ${BUILD_DIR}/Xtest_xdg/share) unset(ENV{XDG_DATA_DIRS}) unset(ENV{NVIM}) # Clear $NVIM in case tests are running from Nvim. #11009 +# TODO(dundargoc): The CIRRUS_CI environment variable isn't passed to here from +# the main CMakeLists.txt, so we have to manually pass it to this script and +# re-set the environment variable. Investigate if we can avoid manually setting +# it like with the GITHUB_CI environment variable. +set(ENV{CIRRUS_CI} ${CIRRUS_CI}) + if(NOT DEFINED ENV{NVIM_LOG_FILE}) set(ENV{NVIM_LOG_FILE} ${BUILD_DIR}/.nvimlog) endif() diff --git a/test/functional/api/server_notifications_spec.lua b/test/functional/api/server_notifications_spec.lua index 1c554b05a3..1c00f001ff 100644 --- a/test/functional/api/server_notifications_spec.lua +++ b/test/functional/api/server_notifications_spec.lua @@ -7,7 +7,6 @@ local exec_lua = helpers.exec_lua local retry = helpers.retry local isCI = helpers.isCI local assert_alive = helpers.assert_alive -local uname = helpers.uname describe('notify', function() local channel @@ -79,9 +78,6 @@ describe('notify', function() end) it('cancels stale events on channel close', function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') - end if isCI() then pending('hangs on CI #14083 #15251') return diff --git a/test/functional/core/fileio_spec.lua b/test/functional/core/fileio_spec.lua index d1ff5b8036..07774866a8 100644 --- a/test/functional/core/fileio_spec.lua +++ b/test/functional/core/fileio_spec.lua @@ -25,7 +25,7 @@ local expect_exit = helpers.expect_exit local write_file = helpers.write_file local Screen = require('test.functional.ui.screen') local feed_command = helpers.feed_command -local uname = helpers.uname +local isCI = helpers.isCI describe('fileio', function() before_each(function() @@ -87,8 +87,8 @@ describe('fileio', function() end) it('backup #9709', function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') + if isCI('cirrus') then + pending('FIXME: cirrus') end clear({ args={ '-i', 'Xtest_startup_shada', '--cmd', 'set directory=Xtest_startup_swapdir' } }) @@ -109,8 +109,8 @@ describe('fileio', function() end) it('backup with full path #11214', function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') + if isCI('cirrus') then + pending('FIXME: cirrus') end clear() mkdir('Xtest_backupdir') diff --git a/test/functional/ex_cmds/write_spec.lua b/test/functional/ex_cmds/write_spec.lua index 14035a4341..4045d13153 100644 --- a/test/functional/ex_cmds/write_spec.lua +++ b/test/functional/ex_cmds/write_spec.lua @@ -9,7 +9,7 @@ local feed_command = helpers.feed_command local funcs = helpers.funcs local meths = helpers.meths local iswin = helpers.iswin -local uname = helpers.uname +local isCI = helpers.isCI local fname = 'Xtest-functional-ex_cmds-write' local fname_bak = fname .. '~' @@ -53,8 +53,8 @@ describe(':write', function() end) it('&backupcopy=no replaces symlink with new file', function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') + if isCI('cirrus') then + pending('FIXME: cirrus') end command('set backupcopy=no') write_file('test_bkc_file.txt', 'content0') @@ -95,8 +95,8 @@ describe(':write', function() end) it('errors out correctly', function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') + if isCI('cirrus') then + pending('FIXME: cirrus') end command('let $HOME=""') eq(funcs.fnamemodify('.', ':p:h'), funcs.fnamemodify('.', ':p:h:~')) diff --git a/test/functional/plugin/man_spec.lua b/test/functional/plugin/man_spec.lua index 203424c855..ebf131fd4a 100644 --- a/test/functional/plugin/man_spec.lua +++ b/test/functional/plugin/man_spec.lua @@ -8,6 +8,7 @@ local nvim_prog = helpers.nvim_prog local matches = helpers.matches local write_file = helpers.write_file local tmpname = helpers.tmpname +local isCI = helpers.isCI clear() if funcs.executable('man') == 0 then @@ -160,6 +161,9 @@ describe(':Man', function() end) it('reports non-existent man pages for absolute paths', function() + if isCI('cirrus') then + pending('FIXME: cirrus') + end local actual_file = tmpname() -- actual_file must be an absolute path to an existent file for us to test against it matches('^/.+', actual_file) diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index 36f9f90143..a423bc9a5a 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -10,7 +10,7 @@ local retry = helpers.retry local ok = helpers.ok local iswin = helpers.iswin local command = helpers.command -local uname = helpers.uname +local isCI = helpers.isCI describe(':terminal', function() local screen @@ -46,8 +46,8 @@ describe(':terminal', function() end) it("reads output buffer on terminal reporting #4151", function() - if uname() == 'freebsd' then - pending('Failing FreeBSD test') + if isCI('cirrus') then + pending('FIXME: cirrus') end if helpers.pending_win32(pending) then return end if iswin() then diff --git a/test/helpers.lua b/test/helpers.lua index a7eda60f87..225a4d35b4 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -790,10 +790,10 @@ end function module.isCI(name) local any = (name == nil) - assert(any or name == 'github') + assert(any or name == 'github' or name == 'cirrus') local gh = ((any or name == 'github') and nil ~= os.getenv('GITHUB_ACTIONS')) - return gh - + local cirrus = ((any or name == 'cirrus') and nil ~= os.getenv('CIRRUS_CI')) + return gh or cirrus end -- Gets the (tail) contents of `logfile`. |