ladybird/AK/Tests/CMakeLists.txt
Brian Gianforcaro 27360f1f20 Build: Fix cmake test runner, so it knows when tests fail
The CMake runner looks at the return code if you don't set
the pattern. Since the AK test suite setup doesn't use return
codes, we were missing test failures.
2020-05-26 13:38:20 +02:00

20 lines
460 B
CMake

file(GLOB AK_TEST_SOURCES "*.cpp")
foreach(source ${AK_TEST_SOURCES})
get_filename_component(name ${source} NAME_WE)
add_executable(${name} ${source})
target_link_libraries(${name} LagomCore)
add_test(
NAME ${name}
COMMAND ${name}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
set_tests_properties(
${name}
PROPERTIES
FAIL_REGULAR_EXPRESSION
"FAIL"
)
endforeach()