From 33e79237bc003e8d6d556bf1b6a6e292bb8945e5 Mon Sep 17 00:00:00 2001 From: Javier Lopez Date: Tue, 12 Oct 2021 22:12:11 -0500 Subject: [PATCH] build(tests): isolate the user environment XDG_DATA_DIRS #16003 Problem: Some tests were not passing on my machine, specifically in `test/functional/api/vim_spec.lua` the two tests under `describe('nvim_get_runtime_file...` Solution: Unset `XDG_DATA_DIRS` in the test runner. Note: Window CI failed if we set it to the same value as `XDG_DATA_HOME`. --- cmake/RunTests.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/RunTests.cmake b/cmake/RunTests.cmake index 0c48a77b9a..e78392562f 100644 --- a/cmake/RunTests.cmake +++ b/cmake/RunTests.cmake @@ -10,6 +10,7 @@ set(ENV{VIMRUNTIME} ${WORKING_DIR}/runtime) set(ENV{NVIM_RPLUGIN_MANIFEST} ${BUILD_DIR}/Xtest_rplugin_manifest) set(ENV{XDG_CONFIG_HOME} ${BUILD_DIR}/Xtest_xdg/config) set(ENV{XDG_DATA_HOME} ${BUILD_DIR}/Xtest_xdg/share) +unset(ENV{XDG_DATA_DIRS}) if(NOT DEFINED ENV{NVIM_LOG_FILE}) set(ENV{NVIM_LOG_FILE} ${BUILD_DIR}/.nvimlog)