mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
Split test_driver.sh into test_env.sh + test_driver.sh
This lets us run non-fish targets (such as `fish_tests`) under a clean test environment without running into the fish-specific payload configuration now carried out by `test_driver.sh` which expects a `.fish` payload that it will run under a deterministically configured instance of fish, running in an environment initialized by `test_env.sh`. This should fix the problem with in-tree builds leaving detritus behind after a `make test` when `fish_tests` would be executed without `test_driver.sh` - it is now executed under `test_env.sh` instead.
This commit is contained in:
@@ -35,7 +35,7 @@ if(POLICY CMP0037)
|
||||
endif()
|
||||
add_custom_target(test
|
||||
COMMAND env CTEST_PARALLEL_LEVEL=${CTEST_PARALLEL_LEVEL} FISH_FORCE_COLOR=1
|
||||
${CMAKE_CTEST_COMMAND} --force-new-ctest-process
|
||||
${CMAKE_CTEST_COMMAND} --force-new-ctest-process # --verbose
|
||||
--output-on-failure --progress
|
||||
DEPENDS fish_tests tests_buildroot_target
|
||||
USES_TERMINAL
|
||||
@@ -124,7 +124,8 @@ add_custom_target(tests_buildroot_target
|
||||
foreach(LTEST ${LOW_LEVEL_TESTS})
|
||||
add_test(
|
||||
NAME ${LTEST}
|
||||
COMMAND ${CMAKE_BINARY_DIR}/fish_tests ${LTEST}
|
||||
COMMAND sh ${CMAKE_CURRENT_BINARY_DIR}/tests/test_env.sh
|
||||
${CMAKE_BINARY_DIR}/fish_tests ${LTEST}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
set_tests_properties(${LTEST} PROPERTIES SKIP_RETURN_CODE ${SKIP_RETURN_CODE})
|
||||
|
||||
Reference in New Issue
Block a user