Skip to content

Commit 94ed2de

Browse files
author
czjaso
committed
Fix coverage workflow.
1 parent 92ab41f commit 94ed2de

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: |
3030
make -C build/ coverage
3131
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*" "\*source\*")
32-
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
32+
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 --ignore-errors unused -r build/coverage.info -o build/coverage.info
3333
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
3434
- name: Check Coverage
3535
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main

tools/unity/coverage.cmake

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ execute_process(
66
COMMAND lcov --directory ${CMAKE_BINARY_DIR}
77
--base-directory ${CMAKE_BINARY_DIR}
88
--zerocounters
9+
--rc lcov_branch_coverage=1
910

1011
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/coverage
1112
)
@@ -15,7 +16,7 @@ execute_process( COMMAND lcov --directory ${CMAKE_BINARY_DIR}
1516
--initial
1617
--capture
1718
--ignore-errors source
18-
--rc branch_coverage=1
19+
--rc lcov_branch_coverage=1
1920
--rc genhtml_branch_coverage=1
2021
--output-file=${CMAKE_BINARY_DIR}/base_coverage.info
2122
)
@@ -47,7 +48,7 @@ execute_process(COMMAND ruby
4748
execute_process(
4849
COMMAND lcov --capture
4950
--ignore-errors source
50-
--rc branch_coverage=1
51+
--rc lcov_branch_coverage=1
5152
--rc genhtml_branch_coverage=1
5253
--base-directory ${CMAKE_BINARY_DIR}
5354
--directory ${CMAKE_BINARY_DIR}
@@ -62,10 +63,10 @@ execute_process(
6263
--add-tracefile ${CMAKE_BINARY_DIR}/second_coverage.info
6364
--output-file ${CMAKE_BINARY_DIR}/coverage.info
6465
--no-external
65-
--rc branch_coverage=1
66+
--rc lcov_branch_coverage=1
6667
)
6768
execute_process(
68-
COMMAND genhtml --rc branch_coverage=1
69+
COMMAND genhtml --rc lcov_branch_coverage=1
6970
--branch-coverage
7071
--output-directory ${CMAKE_BINARY_DIR}/coverage
7172
${CMAKE_BINARY_DIR}/coverage.info

0 commit comments

Comments
 (0)