Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complain if kcov_tool fails #288

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions driver/configurations/bazel/step-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,21 @@ endif()

if(COVERAGE)
set(KCOV_TOOL "${DASHBOARD_SOURCE_DIRECTORY}/tools/dynamic_analysis/kcov_tool")
execute_process(COMMAND "${KCOV_TOOL}" ci_merge)
execute_process(
COMMAND "${KCOV_TOOL}" ci_merge
COMMAND_ECHO STDERR
OUTPUT_VARIABLE KCOV_MERGE_LOG
ERROR_VARIABLE KCOV_MERGE_LOG
RESULT_VARIABLE KCOV_MERGE_RESULT_VARIABLE)
if(NOT KCOV_MERGE_RESULT_VARIABLE EQUAL 0)
message("kcov log: ${KCOV_MERGE_LOG}")
fatal("kcov merge failed")
endif()
set(KCOV_MERGED "${DASHBOARD_SOURCE_DIRECTORY}/bazel-kcov/kcov-merged")
execute_process(COMMAND "${CMAKE_COMMAND}" -E copy "${KCOV_MERGED}/cobertura.xml" "${KCOV_MERGED}/coverage.xml")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy "${KCOV_MERGED}/cobertura.xml" "${KCOV_MERGED}/coverage.xml"
COMMAND_ECHO STDERR
COMMAND_ERROR_IS_FATAL ANY)
set(ENV{COBERTURADIR} "${KCOV_MERGED}")
ctest_coverage(RETURN_VALUE DASHBOARD_COVERAGE_RETURN_VALUE
CAPTURE_CMAKE_ERROR DASHBOARD_COVERAGE_CAPTURE_CMAKE_ERROR
Expand Down