generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workaround absolute paths appearing in coverage data (#524)
Issue reported here: aspect-build/bazel-examples#404 (comment) Now looks like ``` SF:src/__init__.py DA:1,1 DA:2,1 ``` Similar to https://github.com/bazelbuild/rules_python/blob/466da1d9710289bfb01061b9be7bb124132996e0/python/private/python_bootstrap_template.txt#L336-L346 but ours is a bit more principled since we don't break the abstraction of what coveragepy happens to do with the paths. ### Changes are visible to end-users: no ### Test plan - Manual testing; please provide instructions so we can reproduce: Just `bazel coverage src:test` and inspect the .dat file
- Loading branch information
Showing
5 changed files
with
27 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[run] | ||
# NB: this ought to put relative paths into the report files. | ||
# However Bazel actions run in a sandbox with symlinks, and coveragepy follows those out of the sandbox | ||
# resulting in the wrong paths. | ||
# See https://github.com/nedbat/coveragepy/issues/963 and https://github.com/aspect-build/rules_py/pull/524 | ||
relative_files = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
load("@rules_uv//uv:pip.bzl", "pip_compile") | ||
|
||
exports_files([".coveragerc"]) | ||
|
||
pip_compile(name = "pip_compile") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters