[gtk/wip/sadiq/ci: 7/7] ci: Add coverage support



commit 5d5e9e6fd198f79c28febcae462220e99fc25101
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Sep 18 08:48:41 2018 +0530

    ci: Add coverage support

 .gitlab-ci.yml            | 1 +
 .gitlab-ci/test-docker.sh | 3 +++
 2 files changed, 4 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a67069ebee..428f7767cf 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ fedora-x86_64:
   stage: build
   script:
     - bash -x ./.gitlab-ci/test-docker.sh
+  coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
   artifacts:
     when: on_failure
     name: "gtk-${CI_COMMIT_REF_NAME}"
diff --git a/.gitlab-ci/test-docker.sh b/.gitlab-ci/test-docker.sh
index 47cb9e9daf..50a297bbc6 100755
--- a/.gitlab-ci/test-docker.sh
+++ b/.gitlab-ci/test-docker.sh
@@ -12,6 +12,7 @@ ccache --zero-stats
 ccache --show-stats
 export CCACHE_DISABLE=true
 meson \
+        -Db_coverage=true \
         -Dx11-backend=true \
         -Dwayland-backend=true \
         -Dbroadway-backend=true \
@@ -30,3 +31,5 @@ xvfb-run -a -s "-screen 0 1024x768x24" \
         --suite=gtk+ \
         --no-suite=gtk+:gsk \
         --no-suite=gtk+:a11y
+
+ninja coverage


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