This is an automated email from the ASF dual-hosted git repository.
kevinjqliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git
The following commit(s) were added to refs/heads/main by this push:
new c0e7c6d9 Fix: make test-coverage to properly enable coverage for all
test suites (#2989)
c0e7c6d9 is described below
commit c0e7c6d92259225960dfe4c4163d05e2e19707c3
Author: Kevin Liu <[email protected]>
AuthorDate: Sat Jan 31 18:01:05 2026 -0500
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.
-->
---
Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index e710835c..ac213d84 100644
--- a/Makefile
+++ b/Makefile
@@ -133,8 +133,9 @@ test-gcs: ## Run tests marked with @pytest.mark.gcs
sh ./dev/run-gcs-server.sh
$(TEST_RUNNER) pytest tests/ -m gcs $(PYTEST_ARGS)
-test-coverage: COVERAGE=1
-test-coverage: test test-integration test-s3 test-adls test-gcs
coverage-report ## Run all tests with coverage and report
+test-coverage: ## Run all tests with coverage and report
+ $(MAKE) COVERAGE=1 test test-integration test-s3 test-adls test-gcs
+ $(MAKE) coverage-report
coverage-report: ## Combine and report coverage
uv run $(PYTHON_ARG) coverage combine