1
0
mirror of https://github.com/brl/mutter.git synced 2025-06-14 17:29:31 +00:00

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>
This commit is contained in:
Carlos Garnacho
2022-03-01 01:12:58 +01:00
committed by Marge Bot
parent a76542e191
commit 40627f88cf

@ -291,6 +291,13 @@ build-without-native-backend-and-wayland@x86_64:
script: script:
- dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS"
./.gitlab-ci/run-meson.sh test -C build --no-rebuild -t 10 ./.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: artifacts:
expire_in: 1 day expire_in: 1 day
reports: reports:
@ -299,6 +306,7 @@ build-without-native-backend-and-wayland@x86_64:
when: always when: always
paths: paths:
- build - build
- coverage-*.json
test-mutter@x86_64: test-mutter@x86_64:
extends: extends:
@ -314,30 +322,21 @@ test-mutter@aarch64:
needs: needs:
- build-mutter@aarch64 - build-mutter@aarch64
.test-mutter-coverage: coverage:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:35@x86_64
stage: analyze stage: analyze
script: script:
- ninja -C build coverage - mkdir coveragereport
- cat build/meson-logs/coverage.txt - gcovr --add-tracefile coverage-*.json
--html-details --print-summary --output coveragereport/index.html
artifacts: artifacts:
paths: paths:
- build/meson-logs/coveragereport - coveragereport
coverage: '/^TOTAL.*\s+(\d+\%)$/' coverage: '/^lines: (\d+\.\d+\%)/'
test-mutter-coverage@x86_64:
extends:
- .test-mutter-coverage
- .mutter.fedora:35@x86_64
needs: needs:
- test-mutter@x86_64 - test-mutter@x86_64
test-mutter-coverage@aarch64:
extends:
- .test-mutter-coverage
- .mutter.fedora:35@aarch64
needs:
- test-mutter@aarch64 - test-mutter@aarch64
can-build-gnome-shell@x86_64: can-build-gnome-shell@x86_64: