Skip to content

Commit

Permalink
fix(coverage): prevent issues when packages execute files in tmp dir.
Browse files Browse the repository at this point in the history
Fixes #2575
  • Loading branch information
BurnzZ committed Feb 2, 2025
1 parent 33cb431 commit 07fe22d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Unreleased changes template.
The related issue is [#908](https://github.com/bazelbuild/rules_python/issue/908).
* (sphinxdocs) Do not crash when `tag_class` does not have a populated `doc` value.
Fixes ([#2579](https://github.com/bazelbuild/rules_python/issues/2579)).
* (coverage) Prevent coveragepy report issues when packages execute files in tmp dir.
Fixes ([#2575](https://github.com/bazelbuild/rules_python/issues/2575)).

{#v0-0-0-added}
### Added
Expand Down
3 changes: 3 additions & 0 deletions python/private/python_bootstrap_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ relative_files = True
kparams['stdout'] = sys.stderr
kparams['stderr'] = sys.stderr

# Prevent coveragepy report issues when packages execute files in tmp dir.
params.append('--omit="$TMPDIR/*"')

ret_code = subprocess.call(
params,
**kparams
Expand Down

0 comments on commit 07fe22d

Please sign in to comment.