Skip to content

Commit c075270

Browse files
authored
Update test.cmake
1 parent 2da9822 commit c075270

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/cmake/test.cmake

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
## @copyright MIT License
44

55
function(add_flavour_test NAME EXPECTED_VALUES)
6-
add_test(NAME ${NAME} COMMAND ./erun resources/${NAME}.html ${NAME}.html ${EXPECTED_VALUES} ${ARGN})
7-
set_tests_properties(${NAME} PROPERTIES LABELS flavour TIMEOUT 900)
8-
add_custom_target(${NAME} ctest --verbose --tests-regex ${NAME})
6+
target_compile_options(${NAME} PRIVATE $<$<CONFIG:Debug>:--coverage>)
7+
target_link_options(${NAME} PRIVATE $<$<CONFIG:Debug>:--coverage>)
8+
add_test(NAME ${NAME}_test COMMAND ./erun resources/${NAME}_test.html ${NAME}_test.html ${EXPECTED_VALUES} ${ARGN})
9+
set_tests_properties(${NAME}_test PROPERTIES LABELS flavour TIMEOUT 900)
10+
add_custom_target(${NAME}_test ctest --verbose --tests-regex ${NAME}_test)
911
endfunction()
1012

1113
add_custom_target(flavourtests ctest --verbose --label-regex flavour)

0 commit comments

Comments
 (0)