mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-01-05 21:09:56 +00:00
ad52514b97
At the moment we always run ctest with max number of cpus. If undefined, it will keep current behaviour, otherwise it will honour TEST_JOB_COUNT. Therefore to run ctest one test at a time, use `cmake ... -DTEST_JOB_COUNT=1`
26 lines
607 B
CMake
26 lines
607 B
CMake
set (TESTS
|
|
Allocator
|
|
InterruptableConditionVariable
|
|
Filesystem
|
|
)
|
|
|
|
list(APPEND LIBS FEXCore)
|
|
|
|
foreach(API_TEST ${TESTS})
|
|
add_executable(${API_TEST} ${API_TEST}.cpp)
|
|
target_link_libraries(${API_TEST} PRIVATE ${LIBS} Catch2::Catch2WithMain)
|
|
|
|
catch_discover_tests(${API_TEST}
|
|
TEST_SUFFIX ".${API_TEST}.APITest")
|
|
endforeach()
|
|
|
|
add_custom_target(
|
|
api_tests
|
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
|
USES_TERMINAL
|
|
COMMAND "ctest" "--output-on-failure" "--timeout" "302" ${TEST_JOB_FLAG} "-R" "\.*.APITest")
|
|
|
|
foreach(API_TEST ${TESTS})
|
|
add_dependencies(api_tests ${API_TEST})
|
|
endforeach()
|