Symlinked source directories now properly generate reports (python) #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have a slightly weird setup for my ros workspaces where I have a directory where all my git repositories live, and then I selectively symlink them into workspaces as needed, rather than cloning independently for each workspace.
I tried using this tool to generate coverage, but was confused when it seemed that the reports were always empty. I manually checked the output and confirmed that the .coverage file correctly included all the files that were in the repo.
However, source directories which were symlinked would cause mismatch between the paths generated in the coverage and the --include argument. The paths in the coverage are always the real path to files, whereas the source directory might be a symlink.
For example, I have a test repo in a workspace at
/home/michal/robots/michal/catkin_ws/src/ros_coverage_example, which is symlinked from/home/michal/git/independent/ros_coverage_example.The current command generated in order to create the report is
But its result is empty with the given include arg because of the symlink
The coverage report contains the coverage information, but under the filename of the real directory.
This PR fixes the mismatch by changing the include argument so that it uses the real path of the package.