diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-03-01 01:12:58 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2022-03-04 22:47:04 +0000 |
commit | 40627f88cf4a3187a5ff8105c93e097553d9c1fc (patch) | |
tree | 2bfaed846b5070978538b7f4c8adac7db67dbd21 /.gitlab-ci.yml | |
parent | a76542e191944083f5cdf61ea98bdc1d21aa4cf7 (diff) | |
download | mutter-40627f88cf4a3187a5ff8105c93e097553d9c1fc.tar.gz |
ci: Run coverage in all tests, and merge results
Instead of having different coverage outputs for different architectures
and compilation flags, have each of those tests run coverage in order
to generate a JSON report, and have that merged at a final common job.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2315>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0701ab596..3d18a75a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -291,6 +291,13 @@ build-without-native-backend-and-wayland@x86_64: script: - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" ./.gitlab-ci/run-meson.sh test -C build --no-rebuild -t 10 + after_script: + - pushd build + - gcovr --root=.. + --filter='\.\./src/' --filter='\.\./clutter/' --filter='\.\./cogl/' + --exclude='\.\./build/.*\.[ch]$' --exclude='.*/tests/.*\.[ch]$' + --json --output=../coverage-${CI_JOB_NAME}.json + - popd artifacts: expire_in: 1 day reports: @@ -299,6 +306,7 @@ build-without-native-backend-and-wayland@x86_64: when: always paths: - build + - coverage-*.json test-mutter@x86_64: extends: @@ -314,30 +322,21 @@ test-mutter@aarch64: needs: - build-mutter@aarch64 -.test-mutter-coverage: +coverage: extends: - .fdo.distribution-image@fedora + - .mutter.fedora:35@x86_64 stage: analyze script: - - ninja -C build coverage - - cat build/meson-logs/coverage.txt + - mkdir coveragereport + - gcovr --add-tracefile coverage-*.json + --html-details --print-summary --output coveragereport/index.html artifacts: paths: - - build/meson-logs/coveragereport - coverage: '/^TOTAL.*\s+(\d+\%)$/' - -test-mutter-coverage@x86_64: - extends: - - .test-mutter-coverage - - .mutter.fedora:35@x86_64 + - coveragereport + coverage: '/^lines: (\d+\.\d+\%)/' needs: - test-mutter@x86_64 - -test-mutter-coverage@aarch64: - extends: - - .test-mutter-coverage - - .mutter.fedora:35@aarch64 - needs: - test-mutter@aarch64 can-build-gnome-shell@x86_64: |