]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
github: Ignore unused data errors in lcov
authorTom Hromatka <tom.hromatka@oracle.com>
Mon, 13 Jan 2025 17:31:41 +0000 (10:31 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 13 Jan 2025 17:41:23 +0000 (10:41 -0700)
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 <tom.hromatka@oracle.com>
.github/actions/code-coverage/action.yml

index 3d205afa9a64b84baa3d7fdbd74837e4b868a1c0..3b282f49819087ecc48865dcfd696feca74bc8ea 100644 (file)
@@ -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