SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for path equivalence/relocation.

grigorye opened this issue · comments

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.