Repository navigation
Conversation
Instrument the Ubuntu build with clang under GRASS_LLVM_COVERAGE, enabled only on the Python 3.13 matrix cell so the 3.11 cell keeps the default gcc build. LLVM_PROFILE_FILE encodes pid and a hash per binary so xdist workers and C-tool subprocesses never collide on one file, and -fprofile-update=atomic makes counter increments atomic in OpenMP-parallel code (r.univar). Both were needed to make merged coverage deterministic between runs. utils/llvm_coverage_export.sh merges .profraw into .profdata and exports lcov for Codecov. It passes the file list to llvm-profdata via -f instead of argv, since a full test run's per-process .profraw count overflows the shell argument-list limit. utils/ coverage_disk_usage.sh logs .profraw count/size and disk usage before the merge for observability. Also fixes coverage_mapper.py running before coverage combine, which left it unable to read a .coverage file that parallel mode had not created yet. This is the Linux/pytest slice of #674, which also instruments macOS; macOS is out of scope here. AI assistance (Claude Code) helped draft the workflow and script changes.
The script's env-var defaults already made it runnable outside CI; spell that out so it doesn't read as CI-only.
echoix
force-pushed
the
claude/grass-llvm-coverage-pytest-grju4k
branch
from
September 18, 2026 19:44
48b93a8 to
c840379
Compare
echoix
force-pushed
the
claude/llvm-coverage-linux-pytest
branch
from
October 1, 2026 00:24
268712c to
a8a97e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cherry-picks the
lib/clusterpytest ctypes test suite fromOSGeo/grass#7919 (commit
d60b222) onto the LLVM source-based coverage branch(
claude/llvm-coverage-linux-pytest, #681), so the new coverageinstrumentation can be exercised against a real, recently-added test
suite before that mechanism merges.
lib/clusterhad no dedicated test coverage before OSGeo#7919. This PR addsno new tests of its own; it lets the instrumented
pytestCI job in#681 build and run against these 20 new tests so their C-library
coverage (
I_cluster_begin,I_cluster_point,I_cluster_means,I_cluster_assign,I_cluster_reassign,I_cluster_sum2,I_cluster_separation,I_cluster_distinct,I_cluster_merge,I_cluster_reclass,I_cluster_exec, etc.) shows up in the LLVM/lcovexport.
Both branches shared the same base commit (
4bb960b), so the cherry-pickapplied cleanly with no conflicts.
Testing
This PR is itself a coverage smoke test: the intent is for the
instrumented
pytestCI job from #681 to run against these tests andshow
lib/clustercoverage in the exported lcov/Codecov output.AI Disclosure
Assembled with AI assistance (Claude Code): fetched the two source
branches, cherry-picked the test commit, and drafted this description.
The test suite's own content and verification are from OSGeo#7919
and are not the product of this session.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ToEfp9Bpb3rkdhfcg8Wgei
Generated by Claude Code