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

Bug 1639158: Fix Python coverage testing #893

Merged
merged 1 commit into from May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveragerc
@@ -0,0 +1,2 @@
[run]
source = glean
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -178,7 +178,7 @@ rust-coverage: ## Generate code coverage information for Rust code
.PHONY: rust-coverage

python-coverage: build-python ## Generate a code coverage report for Python
$(GLEAN_PYENV)/bin/python3 -m coverage run --parallel-mode -m pytest
GLEAN_COVERAGE=1 $(GLEAN_PYENV)/bin/python3 -m coverage run --parallel-mode -m pytest
$(GLEAN_PYENV)/bin/python3 -m coverage combine
$(GLEAN_PYENV)/bin/python3 -m coverage html
.PHONY: python-coverage
Expand Up @@ -18,7 +18,7 @@
import sys

# Run coverage in the subprocess if necessary
if "COVERAGE_PROCESS_START" in os.environ:
if "GLEAN_COVERAGE" in os.environ and "COVERAGE_PROCESS_START" in os.environ:
import coverage # type: ignore

config_path = os.environ.get("COVERAGE_PROCESS_START")
Expand Down