Changeset View
Changeset View
Standalone View
Standalone View
cmake/modules/TestSuite.cmake
Show All 9 Lines | macro(create_test_suite NAME) | ||||
# If the magic target check-all exists, attach to it. | # If the magic target check-all exists, attach to it. | ||||
if(TARGET check-all) | if(TARGET check-all) | ||||
add_dependencies(check-all ${TARGET}) | add_dependencies(check-all ${TARGET}) | ||||
endif() | endif() | ||||
endmacro(create_test_suite) | endmacro(create_test_suite) | ||||
set(TEST_RUNNER_TEMPLATE "${CMAKE_CURRENT_LIST_DIR}/../templates/TestRunner.cmake.in") | set(TEST_RUNNER_TEMPLATE "${CMAKE_CURRENT_LIST_DIR}/../templates/TestRunner.cmake.in") | ||||
function(_add_test_runner SUITE NAME COMMAND) | function(_add_test_runner SUITE NAME COMMAND) | ||||
set(TARGET "test-${NAME}") | set(TARGET "check-${SUITE}-${NAME}") | ||||
set(LOG "${NAME}.log") | set(LOG "${NAME}.log") | ||||
set(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/run-${NAME}.sh") | set(RUNNER "${CMAKE_CURRENT_BINARY_DIR}/run-${NAME}.sh") | ||||
list(JOIN ARGN " " ARGS) | list(JOIN ARGN " " ARGS) | ||||
configure_file( | configure_file( | ||||
"${TEST_RUNNER_TEMPLATE}" | "${TEST_RUNNER_TEMPLATE}" | ||||
"${RUNNER}" | "${RUNNER}" | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |