Skip to content

Support for path equivalence/relocation. #548

@grigorye

Description

@grigorye

We're using slather for coverage reporting on CI, and in our case the job that runs coverage does not have access to the source tree at the exact location used for building the project. As a result, currently slather fails to produce the expected reports because llvm-cov complaints "Source file does not exist, proceeded by ignoring it".

bundle exec slather coverage --sonarqube-xml --verbose --scheme Foo --input-format profdata --source-directory . --binary-file DerivedData/YYY/Build/Products/Debug-iphonesimulator/ZZZ/ZZZ.framework/ZZZ --build-directory .DerivedData --arch arm64 Pods/Pods.xcodeproj
Slathering...

Processing coverage file: /XXX/DerivedData/Marktplaats/Build/ProfileData/67DAEC2E-11AB-4752-A18D-98187A5CE519/Coverage.profdata
Against binary files:
	DerivedData/YYY/Build/Products/Debug-iphonesimulator/ZZZ/ZZZ.framework/ZZZ

warning: /MMM/Modules/Foo/Sources/Foo/Dependencies/Bar.swift: Source file doesn't exist, proceeded by ignoring it.

From what I learned, to solve this, we need support for path-equivalence in llvm-cov, the idea is illustrated in #547.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions