diff --git a/CHANGELOG.md b/CHANGELOG.md index 82aeda8117..3f9972fa12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/python/private/python_bootstrap_template.txt b/python/private/python_bootstrap_template.txt index e3b39e30cd..2b7288f79e 100644 --- a/python/private/python_bootstrap_template.txt +++ b/python/private/python_bootstrap_template.txt @@ -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