From f6ff85b1b7accae97e486b07cea9bc6fa177582e Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 4 Mar 2021 17:35:09 +0200 Subject: [PATCH] CI: work around Gitlab Cobertura parsing quirk This should not be necessary, but my testing with fd.o Gitlab 13.9.1 shows this is needed. Otherwise the coverage markings will not appear in a MR diff view. Apparently Gitlab has some problem with 'filename' attribute containing "../" in Cobertura XML files, even when that does result in a correct path. Or maybe the problem is is with the path referring to the build dir which from Gitlab perspective does not exist in the project, even though builddir/../ is a good path. This sed hack removes the "../" part and the last element in the path correspondingly. See https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/567 for my testing. Signed-off-by: Pekka Paalanen --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e5b1aa89..d5e8fb55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,6 +109,7 @@ build-native-meson-default-options: after_script: - ninja -C build-* coverage-html - ninja -C build-* coverage-xml + - sed -i -e 's/\/build-weston-build-native-meson-default-options//' -e 's/\"..\//\"/' build-*/meson-logs/coverage.xml artifacts: reports: cobertura: build-*/meson-logs/coverage.xml