mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
Prefix all ninja/cmake test target names with test_
`test:foo` is not allowed by CMake ("reserved name") and `test/foo` won't work since CMake doesn't allow targets to have a directory separator in their name.
This commit is contained in:
parent
1f4d16cb07
commit
6fc8038b4e
1 changed files with 8 additions and 8 deletions
|
@ -97,6 +97,14 @@ configure_file(build_tools/pexpect_helper.py pexpect_helper.py COPYONLY)
|
|||
# your binaries actually being built before `make test` is executed (requiring `make all` first),
|
||||
# and the only dependency a test can have is on another test. So we make building fish and
|
||||
# `fish_tests` prerequisites to our entire top-level `test` target.
|
||||
function(add_test_target NAME)
|
||||
add_custom_target("test_${NAME}"
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R "^${NAME}$$"
|
||||
DEPENDS fish_tests tests_buildroot_target
|
||||
USES_TERMINAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
add_custom_target(tests_buildroot_target
|
||||
# Make the directory in which to run tests:
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${TEST_INSTALL_DIR}
|
||||
|
@ -111,14 +119,6 @@ add_custom_target(tests_buildroot_target
|
|||
${TEST_ROOT_DIR}
|
||||
DEPENDS fish fish_test_helper)
|
||||
|
||||
function(add_test_target NAME)
|
||||
add_custom_target(${NAME}
|
||||
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -R "^${NAME}$$"
|
||||
DEPENDS fish_tests tests_buildroot_target
|
||||
USES_TERMINAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
foreach(LTEST ${LOW_LEVEL_TESTS})
|
||||
add_test(
|
||||
NAME ${LTEST}
|
||||
|
|
Loading…
Reference in a new issue