-
Notifications
You must be signed in to change notification settings - Fork 134
Add gcov-based test pruning with file-level coverage cache #1316
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
Merged
sbryngelson
merged 10 commits into
MFlowCode:master
from
sbryngelson:gcov-test-pruning-v3-rebase
Mar 17, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1e90404
Add gcov-based test pruning with file-level coverage cache
sbryngelson ff1cc20
Fix review findings: gcov error handling, diagnostics, comments
sbryngelson b46c163
Add tests for load_coverage_cache and _compute_gcov_prefix_strip, cla…
sbryngelson 24235d9
TEMP: disable cases.py staleness check and ALWAYS_RUN_ALL to test pru…
sbryngelson 295bfd0
Wait for rebuild-cache when it runs, skip immediately when it doesn't
sbryngelson 14cbf82
TEMP: bypass should_run_all_tests to test pruning on this PR
sbryngelson ceda4b7
Include example tests in coverage pruning and cache builds
sbryngelson dbf0013
Revert all TEMP changes: restore staleness check, ALWAYS_RUN_ALL, sho…
sbryngelson 5ea88f4
Fix _parse_gcov_json_output return type annotation to Optional[set]
sbryngelson f5d7344
Fix lint: remove separator comments flagged by new source linter (#1193)
sbryngelson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Number of parallel jobs: use SLURM allocation or default to 24. | ||
| # Cap at 64 to avoid overwhelming OpenMPI daemons and OS process limits with concurrent launches. | ||
| NJOBS="${SLURM_CPUS_ON_NODE:-24}" | ||
| if [ "$NJOBS" -gt 64 ]; then NJOBS=64; fi | ||
|
|
||
| # Clean stale build artifacts: the self-hosted runner may have a cached | ||
| # GPU build (e.g. --gpu mp) whose CMake flags are incompatible with gcov. | ||
| ./mfc.sh clean | ||
|
|
||
| # Source retry_build() for NFS stale file handle resilience (3 attempts). | ||
| source .github/scripts/retry-build.sh | ||
|
|
||
| # Build MFC with gcov coverage instrumentation (CPU-only, gfortran). | ||
| retry_build ./mfc.sh build --gcov -j 8 | ||
|
|
||
| # Run all tests in parallel, collecting per-test coverage data. | ||
| # Each test gets an isolated GCOV_PREFIX directory so .gcda files | ||
| # don't collide. Coverage is collected per-test after all tests finish. | ||
| # --gcov is required so the internal build step preserves instrumentation. | ||
| ./mfc.sh test --build-coverage-cache --gcov -j "$NJOBS" |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.