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

feat: new COVERAGEPY_IGNORE_ERRORS env var #2597

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ Unreleased changes template.

{#v0-0-0-added}
### Added
* Nothing added.
* (coverage) New COVERAGEPY_IGNORE_ERRORS environment var that adds the `--ignore-errors`
flag to coverage.py when producing the lcov output file.

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

# Ignore errors finding source files during coverage.py reporting
# See https://coverage.readthedocs.io/en/7.6.10/cmd.html#reporting
# See: https://github.com/bazelbuild/rules_python/issues/2575
if os.getenv("COVERAGEPY_IGNORE_ERRORS"):
params.append("--ignore-errors")

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