From c8bd97fb6e170990d484f37a8d79e82098509e5c Mon Sep 17 00:00:00 2001 From: Tom Hromatka Date: Mon, 13 Jan 2025 10:31:41 -0700 Subject: [PATCH] github: Ignore unused data errors in lcov The "Unit Tests" job was throwing the following lcov error: Summary coverage rate: lines......: 20.5% (1073 of 5227 lines) functions..: 29.0% (73 of 252 functions) branches...: no data found (use "lcov --ignore-errors unused ..." to bypass this error) Add "--ignore errors unused" to the lcov command to work around this. Signed-off-by: Tom Hromatka --- .github/actions/code-coverage/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/code-coverage/action.yml b/.github/actions/code-coverage/action.yml index 3d205afa..3b282f49 100644 --- a/.github/actions/code-coverage/action.yml +++ b/.github/actions/code-coverage/action.yml @@ -19,7 +19,8 @@ runs: "$(pwd)/src/python/libcgroup.c" \ "$(pwd)/src/parse.c" \ "$(pwd)/src/lex.c" \ - -o lcov.tests + -o lcov.tests \ + --ignore-errors unused shell: bash - run: | lcov -r lcov.base "/usr/include/python3.8/objimpl.h" \ @@ -27,7 +28,8 @@ runs: "$(pwd)/src/python/libcgroup.c" \ "$(pwd)/src/parse.c" \ "$(pwd)/src/lex.c" \ - -o lcov.base + -o lcov.base \ + --ignore-errors unused shell: bash - run: lcov -a lcov.base -a lcov.tests -o lcov.total shell: bash -- 2.47.3