Skip to content
Snippets Groups Projects
Commit 694ae125 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Feat: add CTest with coverage and junit output

parent 3066c576
No related branches found
No related tags found
No related merge requests found
......@@ -136,6 +136,16 @@ macro (ihta_add_test)
set_property (TARGET coverage_report PROPERTY FOLDER "coverage")
set_property (TARGET ${IHTA_ADD_TEST_NAME}_coverage PROPERTY FOLDER "coverage")
set_property (TARGET ${IHTA_ADD_TEST_NAME}_coverage_report PROPERTY FOLDER "coverage")
file (TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} IHTA_ADD_TEST_NATIVE_SOURCES)
add_test (
NAME "${IHTA_ADD_TEST_NAME}.Global.Global"
COMMAND
OpenCppCoverage --export_type=cobertura:${CMAKE_CURRENT_BINARY_DIR}/coverage.xml
--sources=${IHTA_ADD_TEST_NATIVE_SOURCES} --excluded_sources=*out* --
$<TARGET_FILE:${IHTA_ADD_TEST_NAME}> -r junit::out=${CMAKE_CURRENT_BINARY_DIR}/result-junit.xml
)
else ()
# use [namespace].[class].[testname] naming
add_test (NAME "${IHTA_ADD_TEST_NAME}.Global.Global" COMMAND ${IHTA_ADD_TEST_NAME}) # todo fix namespace name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment