Skip to content

Conversation

@grigorye
Copy link

@grigorye grigorye commented Oct 6, 2023

This illustrates the idea of the functionality that we miss. The corresponding issue: #548.

source_file_pathname.realpath.relative_path_from(Pathname("./").realpath)
test_path=source_file_pathname
if ENV["COVERAGE_PATH_EQUIVALENCE"]
test_path=Pathname("." + "#{source_file_pathname}".delete_prefix(ENV["COVERAGE_PATH_EQUIVALENCE"].delete_suffix(",.")))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only supports COVERAGE_PATH_EQUIVALENCE=XXX,., i.e. relocation from a given source root (XXX) to the current directory.

@grigorye grigorye changed the title Added primitive support for COVERAGE_PATH_EQUIVALENCE. Added primitive support for llvm-cov -path-equivalence. Oct 6, 2023
@grigorye grigorye force-pushed the feature/Path-Equivalence branch from 1b102c1 to 0626201 Compare October 10, 2023 07:34
@grigorye grigorye force-pushed the feature/Path-Equivalence branch from 0626201 to be06263 Compare October 10, 2023 09:00
@im-jersh
Copy link

i think this might address #531? seems like a similar issue where the source file absolute paths are different at the time slather is run than when the tests were run.

@grigorye
Copy link
Author

i think this might address #531? seems like a similar issue where the source file absolute paths are different at the time slather is run than when the tests were run.

At quick glance, it looks like that: you can probably take a look at #548 and try to see if it's similar.

@jarrodlombardo-EventBase
Copy link
Contributor

LGTM

@StasMarynych
Copy link

Also interested in such functionality, are there any further steps planned for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants