File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ RUN apt update && apt upgrade --yes
99
1010RUN apt install --yes gcc-14 g++-14
1111RUN apt install --yes clang-format pre-commit
12- RUN apt install --yes gcovr lcov
12+ RUN apt install --yes lcov
1313
1414# Choose default gcc and g++ version
1515
Original file line number Diff line number Diff line change @@ -68,17 +68,21 @@ add_test(NAME test.fetch COMMAND ${CMAKE_COMMAND} --build "${PROJECT_BINARY_DIR}
6868
6969if (TRAITS_TEST_COVERAGE)
7070 find_program (LCOV lcov REQUIRED)
71- find_program (GCOVR gcovr REQUIRED)
72- find_program (GENHTML genhtml REQUIRED)
71+ find_program (PYTHON3 python3 REQUIRED)
7372
7473 set (CMAKE_CXX_FLAGS "-O0 -coverage" )
7574
7675 add_custom_target (
7776 coverage
78- COMMAND "${LCOV} " --capture --directory . --exclude '/usr/*' --exclude 'gtest/*' --output -file
79- coverage.info
80- COMMAND "${LCOV} " --list coverage.info
81- COMMAND "${GCOVR} " --cobertura --cobertura-pretty --exclude '/usr/*' --exclude 'gtest/*'
82- --output coverage.cobertura.xml
77+ COMMAND "${LCOV} " --capture --directory "${CMAKE_BINARY_DIR} " --exclude '/usr/*' --exclude
78+ '/*/gtest/*' --output -file "${CMAKE_BINARY_DIR} /coverage.info"
79+ COMMAND "${LCOV} " --list "${CMAKE_BINARY_DIR} /coverage.info"
80+ COMMAND
81+ wget -O "${CMAKE_BINARY_DIR} /lcov_cobertura.py"
82+ https://raw.github.com/eriwen/lcov-to-cobertura-xml/master/lcov_cobertura/lcov_cobertura.py
83+ COMMAND
84+ "${PYTHON3} " "${CMAKE_BINARY_DIR} /lcov_cobertura.py" "${CMAKE_BINARY_DIR} /coverage.info"
85+ --base-dir "${CMAKE_SOURCE_DIR} " --demangle --output
86+ "${CMAKE_BINARY_DIR} /coverage.cobertura.xml"
8387 WORKING_DIRECTORY "${CMAKE_BINARY_DIR} " )
8488endif ()
You can’t perform that action at this time.
0 commit comments