Skip to content

Commit 9fb929f

Browse files
committed
feat: new COVERAGEPY_IGNORE_ERRORS env var
1 parent 466da1d commit 9fb929f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ Unreleased changes template.
7878

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

8384
{#v0-0-0-removed}
8485
### Removed

python/private/python_bootstrap_template.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,11 @@ relative_files = True
461461
kparams['stdout'] = sys.stderr
462462
kparams['stderr'] = sys.stderr
463463

464+
# Workaround for coveragepy having weird errors.
465+
# See: https://github.com/bazelbuild/rules_python/issues/2575
466+
if os.getenv("COVERAGEPY_IGNORE_ERRORS"):
467+
params.append("--ignore-errors")
468+
464469
ret_code = subprocess.call(
465470
params,
466471
**kparams

0 commit comments

Comments
 (0)