File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Original file line number Diff line number Diff line change @@ -197,6 +197,7 @@ endif()
197
197
# ccov-report : Generates HTML code coverage report for every target added with 'AUTO' parameter.
198
198
# ccov-${TARGET_NAME} : Generates HTML code coverage report.
199
199
# ccov-report-${TARGET_NAME} : Prints to command line summary per-file coverage information.
200
+ # ccov-export-${TARGET_NAME} : Exports the coverage report to a JSON file.
200
201
# ccov-show-${TARGET_NAME} : Prints to command line detailed per-line coverage information.
201
202
# ccov-all : Generates HTML code coverage report, merging every target added with 'ALL' parameter into a single detailed report.
202
203
# ccov-all-report : Prints summary per-file coverage information for every target added with ALL' parameter to the command line.
@@ -359,6 +360,17 @@ function(target_code_coverage TARGET_NAME)
359
360
${EXCLUDE_REGEX}
360
361
DEPENDS ccov-processing-${target_code_coverage_COVERAGE_TARGET_NAME} )
361
362
363
+ # Export coverage information so continuous integration tools (e.g.
364
+ # Jenkins) can consume it
365
+ add_custom_target (
366
+ ccov-export-${target_code_coverage_COVERAGE_TARGET_NAME}
367
+ COMMAND
368
+ ${LLVM_COV_PATH} export $< TARGET_FILE:${TARGET_NAME} > ${SO_OBJECTS}
369
+ -instr-profile=${target_code_coverage_COVERAGE_TARGET_NAME}.profdata
370
+ -format= "text" ${EXCLUDE_REGEX} >
371
+ ${CMAKE_COVERAGE_OUTPUT_DIRECTORY} /${target_code_coverage_COVERAGE_TARGET_NAME}.json
372
+ DEPENDS ccov-processing-${target_code_coverage_COVERAGE_TARGET_NAME} )
373
+
362
374
# Generates HTML output of the coverage information for perusal
363
375
add_custom_target (
364
376
ccov-${target_code_coverage_COVERAGE_TARGET_NAME}
You can’t perform that action at this time.
0 commit comments