Repository navigation
Exclude test code from coverage and run candidates once - #7
Merged
Merged
Conversation
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.
Test functions and helpers in
src/previously contributed to raw coverage, and requesting XML plus JSON ran each candidate twice. Coverage now temporarily marks test-only modules/functions with#[coverage(off)], runs tests once, and exports JSON from the same data as XML. Production callees remain instrumented and candidate runs retain cargo-llvm-cov’s default cleanup.The shared entry also powers
utgen coverage -p <standalone-crate-copy>for original-test baselines without model configuration. Temporary same-line feature gates preserve line numbers and leave compiler flags untouched; source bytes saved at coverage entry are restored after successful runs and returned build/report errors. Preprocessing shares test identification, including standalonecfg(test)helpers. No new dependencies or fingerprinting were added; the regression script now compares bytes directly.Validation on the pinned nightly and cargo-llvm-cov 0.6.16:
cargo build --workspace --lockedpassed.cargo test --workspace --locked: 26 passed, one existing opt-in live-model test ignored.Scope remains a standalone crate with
src/plus Cargo target entry files. Macro expansion, broader generation/repair recovery, forced-termination recovery, concurrency limits, and timeouts remain later work. Git history is retained.Linux validation also passed for both the branch run and the PR run, including the full minimal pipeline.