##// END OF EJS Templates
Add the coverage target whith the test. make coverage will call the code...
perrinel -
r44:31b8fb9583a3
parent child
Show More
@@ -69,6 +69,7 IF(BUILD_TESTS)
69 69 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
70 70 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
71 71
72 SET(TARGETS_COV)
72 73 FOREACH( testFile ${TESTS_SOURCES} )
73 74 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
74 75 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
@@ -88,13 +89,21 IF(BUILD_TESTS)
88 89 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
89 90 qt5_use_modules(${testName} Test)
90 91
91 ADD_TEST( NAME ${testName} COMMAND ${testDirectory} )
92 ADD_TEST( NAME ${testName} COMMAND ${testName} )
92 93
93 94 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
94 95 set(Coverage_NAME ${testName})
95 96 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
97 LIST( APPEND TARGETS_COV ${testName}_coverage)
98
96 99 ENDFOREACH( testFile )
97 100
101 add_custom_target(coverage)
102
103 FOREACH( target_cov ${TARGETS_COV} )
104 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
105 ENDFOREACH( target_cov )
106
98 107 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
99 108 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
100 109 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
General Comments 5
Under Review
author

Auto status change to "Under Review"

Rejected
author

Closing with Status change > Rejected

Under Review
author

Auto status change to "Under Review"

Approved
author

Status change > Approved

You need to be logged in to leave comments. Login now