Skip to content

Commit 4cad1c3

Browse files
kevinjqliukris-gaudel
authored andcommitted
Fix: make test-coverage to properly enable coverage for all test suites (#2989)
<!-- Thanks for opening a pull request! --> <!-- In the case this PR will resolve an issue, please replace ${GITHUB_ISSUE_ID} below with the actual Github issue id. --> <!-- Closes #${GITHUB_ISSUE_ID} --> # Rationale for this change The `test-coverage` target was failing with "No data to combine" because the `COVERAGE=1` variable wasn't being propagated to prerequisite test targets. Make's target-specific variable syntax (`test-coverage: COVERAGE=1`) only sets the variable for that specific target, not for its prerequisites when they execute as separate Make invocations. Found this out when verifying release, which is the only place we run `make test-coverage`. CI runs `make coverage-report` ## Are these changes tested? Ran `make test-coverage` before and after ## Are there any user-facing changes? <!-- In the case of user-facing changes, please add the changelog label. -->
1 parent a2c1b7f commit 4cad1c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ test-gcs: ## Run tests marked with @pytest.mark.gcs
133133
sh ./dev/run-gcs-server.sh
134134
$(TEST_RUNNER) pytest tests/ -m gcs $(PYTEST_ARGS)
135135

136-
test-coverage: COVERAGE=1
137-
test-coverage: test test-integration test-s3 test-adls test-gcs coverage-report ## Run all tests with coverage and report
136+
test-coverage: ## Run all tests with coverage and report
137+
$(MAKE) COVERAGE=1 test test-integration test-s3 test-adls test-gcs
138+
$(MAKE) coverage-report
138139

139140
coverage-report: ## Combine and report coverage
140141
uv run $(PYTHON_ARG) coverage combine

0 commit comments

Comments
 (0)