Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added primitive support for llvm-cov -path-equivalence. #547

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

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
@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.

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.

2 participants