[libsoup/pgriffis/valgrind: 2/2] ci: Simplify coverage reports




commit 9acdb8b399a42e2a119a85ee3713d997e06abf68
Author: Patrick Griffis <pgriffis igalia com>
Date:   Fri Nov 13 15:38:49 2020 -0600

    ci: Simplify coverage reports

 .gitlab-ci.yml                | 27 +++++----------------------
 .gitlab-ci/coverage-docker.sh | 33 ---------------------------------
 .gitlab-ci/fixup-cov-paths.py | 29 -----------------------------
 .gitlab-ci/lcovrc             | 13 -------------
 4 files changed, 5 insertions(+), 97 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 483bcf6d..1cb97cd2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,15 +15,11 @@ stages:
 
 fedora-test:
   extends: .build
-  variables:
-    CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
   script:
-    - meson _build -Dauto_features=enabled
+    - meson _build -Db_coverage=true -Dauto_features=enabled
     - ninja -C _build
-    - mkdir -p _coverage
-    - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file 
"_coverage/${CI_JOB_NAME}-baseline.lcov"
     - ninja -C _build test
-    - lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file 
"_coverage/${CI_JOB_NAME}.lcov"
+    - ninja -C _build coverage-html
   artifacts:
     reports:
       junit: "_build/${CI_JOB_NAME}-report.xml"
@@ -31,9 +27,9 @@ fedora-test:
     when: always
     paths:
       - "_build/config.h"
-      - "_build/meson-logs"
-      - "_build/${CI_JOB_NAME}-report.xml"
-      - "_coverage"
+      - "_build/meson-logs/testlog.txt"
+      - "_build/meson-logs/coveragereport"
+  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
 
 fedora-scan:
   extends: .build
@@ -57,19 +53,6 @@ fedora-valgrind:
     paths:
       - _build/meson-logs/testlog-valgrind.txt
 
-coverage:
-  stage: coverage
-  needs: [fedora-test]
-  except:
-    - tags
-  artifacts:
-    name: "libsoup-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
-    paths:
-      - _coverage/
-  script:
-    - bash -x ./.gitlab-ci/coverage-docker.sh
-  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
-
 reference:
   stage: docs
   variables:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]