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 <source> 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 <source> path correspondingly. See https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/567 for my testing. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
e72119f1ee
commit
f6ff85b1b7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user