Skip to content

Cobertura parser: Extract filename OS-agnostically as well (also see #102295)

Bernhard Marconato requested to merge bmarconato/gitlab:master into master
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Resolves #336403 (comment 1980682670)

With !102295 (merged), the source path was already checked for backslashes, but not the filename parameter, which can also contain a relative path.

By replacing any Windows-backslashes first, we ensure that:

  1. the subsequent Unix-style path split works, and thus
  2. test coverage visualization works even when the report was generated on a Windows-based GitLab Runner.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Not beneficial for this small change.

How to set up and validate locally

I added a spec test and the test is green.

Edited by Michael Becker

Merge request reports