Skip to content

Commit e93ce16

Browse files
committed
chore: wrapper script tests now list needed executables in REQUIRED_FILES
1 parent c32f60f commit e93ce16

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

tests/perft/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ foreach (data_file IN LISTS testcase_files)
4040
)
4141
# cmake-format: on
4242

43+
set (test_name "ben_bot.perft.${filename}.${depth}")
44+
4345
add_test (
44-
NAME "ben_bot.perft.${filename}.${depth}"
46+
NAME "${test_name}"
4547
COMMAND Python::Interpreter "${CMAKE_CURRENT_LIST_DIR}/perft.py" "--test=${data_file}"
4648
"--engine=$<TARGET_FILE:ben_bot>" "--depth=${depth}"
4749
)
50+
51+
set_tests_properties ("${test_name}" PROPERTIES REQUIRED_FILES "$<TARGET_FILE:ben_bot>")
4852
endforeach ()
4953

5054
set_property (DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${data_file}")

tests/position-solver/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ foreach (epd_file IN LISTS testcase_files)
4343
CONFIGURATIONS Release
4444
)
4545

46+
# cmake-format: off
4647
set_tests_properties (
4748
"${test_name}"
48-
PROPERTIES ATTACHED_FILES_ON_FAIL "${engine_log}" RESOURCE_LOCK BenBotPositionSolver
49-
# allow 10 minutes after the go command is received
50-
TIMEOUT_AFTER_MATCH "600;: << go"
49+
PROPERTIES
50+
ATTACHED_FILES_ON_FAIL "${engine_log}"
51+
RESOURCE_LOCK BenBotPositionSolver
52+
REQUIRED_FILES "$<TARGET_FILE:ben_bot>"
53+
# allow 10 minutes after the go command is received
54+
TIMEOUT_AFTER_MATCH "600;: << go"
5155
)
56+
# cmake-format: on
5257

5358
set_property (DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES "${engine_log}")
5459
endforeach ()

tests/rampart/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ foreach (data_file IN LISTS testcase_files)
5151
"--test=${data_file}" "--exec=$<TARGET_FILE:rampart>"
5252
)
5353

54-
set_tests_properties ("${test_name}" PROPERTIES REQUIRED_FILES "${data_file}")
54+
set_tests_properties ("${test_name}" PROPERTIES REQUIRED_FILES "$<TARGET_FILE:rampart>")
5555
endforeach ()

0 commit comments

Comments
 (0)