mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
CTestCoverageCollectGCOV: Capture gcov output in log file
The output of gcov can be large and we only display it in a failure case. Put it in a log file to avoid accumulating large output in memory. Issue: #20554
This commit is contained in:
@@ -139,7 +139,8 @@ function(ctest_coverage_collect_gcov)
|
||||
endif()
|
||||
execute_process(COMMAND
|
||||
${gcov_command} ${GCOV_GCOV_OPTIONS} ${gcda_files}
|
||||
OUTPUT_VARIABLE out
|
||||
OUTPUT_FILE "${coverage_dir}/gcov.log"
|
||||
ERROR_FILE "${coverage_dir}/gcov.log"
|
||||
RESULT_VARIABLE res
|
||||
WORKING_DIRECTORY ${coverage_dir})
|
||||
|
||||
@@ -149,7 +150,7 @@ function(ctest_coverage_collect_gcov)
|
||||
|
||||
if(NOT "${res}" EQUAL 0)
|
||||
if (NOT GCOV_QUIET)
|
||||
message(STATUS "Error running gcov: ${res} ${out}")
|
||||
message(STATUS "Error running gcov: ${res}, see\n ${coverage_dir}/gcov.log")
|
||||
endif()
|
||||
endif()
|
||||
# create json file with project information
|
||||
|
||||
Reference in New Issue
Block a user