]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: drop generated stuff from the final coverage report
authorFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 19 May 2023 09:07:07 +0000 (11:07 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Fri, 19 May 2023 09:07:07 +0000 (11:07 +0200)
Let's drop stuff from the current $BUILD_DIR from the final coverage
report, as it's all generated files (mostly gperf) which we don't
really care about and it makes the Coveralls report confusing, since it
reports "source not available" for all such files.

test/test-functions

index 057b748f81824969e8d71c16ccb878f77716714b..3a2a59758f70ffebcb9af640a66594b077e47f1b 100644 (file)
@@ -1513,8 +1513,8 @@ check_coverage_reports() {
         return 1
     fi
 
-    # Create a coverage report that will later be uploaded. Remove info about
-    # system libraries/headers, as we don't really care about them.
+    # Create a coverage report that will later be uploaded. Remove info about system
+    # libraries/headers and generated files, as we don't really care about them.
     lcov --directory "${root}/${BUILD_DIR:?}" --capture --output-file "${dest}.new"
     if [[ -f "$dest" ]]; then
         # If the destination report file already exists, don't overwrite it, but
@@ -1526,7 +1526,7 @@ check_coverage_reports() {
         # report we did during the setup phase (see test_setup()).
         lcov --add-tracefile "${TESTDIR:?}/coverage-base" --add-tracefile "${dest}.new" -o "${dest}"
     fi
-    lcov --remove "$dest" -o "$dest" '/usr/include/*' '/usr/lib/*'
+    lcov --remove "$dest" -o "$dest" '/usr/include/*' '/usr/lib/*' "${BUILD_DIR:?}/*"
     rm -f "${dest}.new"
 
     # If the test logs contain lines like: