mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
test: Force $TEST_FILE to relative path [ci skip] #10535
- Always force TEST_PATH to a relative path. - Eliminate rel_test_path. (The code simplification is worth the extra subdirectory below Xtest_tmpdir/.)
This commit is contained in:
parent
d4e93fedf1
commit
6614543316
@ -16,10 +16,13 @@ endif()
|
||||
|
||||
if(DEFINED ENV{TEST_FILE})
|
||||
set(TEST_PATH "$ENV{TEST_FILE}")
|
||||
set(rel_test_path "${TEST_PATH}")
|
||||
else()
|
||||
set(TEST_PATH "${TEST_DIR}/${TEST_TYPE}")
|
||||
file(RELATIVE_PATH rel_test_path "${TEST_DIR}" "${TEST_PATH}")
|
||||
endif()
|
||||
|
||||
# Force $TEST_PATH to workdir-relative path ("test/…").
|
||||
if(IS_ABSOLUTE ${TEST_PATH})
|
||||
file(RELATIVE_PATH TEST_PATH "${WORKING_DIR}" "${TEST_PATH}")
|
||||
endif()
|
||||
|
||||
if(BUSTED_OUTPUT_TYPE STREQUAL junit)
|
||||
@ -38,7 +41,7 @@ if(DEFINED ENV{TEST_FILTER} AND NOT "$ENV{TEST_FILTER}" STREQUAL "")
|
||||
endif()
|
||||
|
||||
# TMPDIR: use relative test path (for parallel test runs / isolation).
|
||||
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${rel_test_path}")
|
||||
set(ENV{TMPDIR} "${BUILD_DIR}/Xtest_tmpdir/${TEST_PATH}")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory $ENV{TMPDIR})
|
||||
|
||||
set(ENV{SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_NAME}) # used by test/helpers.lua.
|
||||
|
Loading…
Reference in New Issue
Block a user