Add native C++ coverage via OpenCppCoverage - #1049
Draft
jasonleenaylor wants to merge 1 commit into
Draft
Conversation
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1049 +/- ##
==========================================
+ Coverage 36.43% 38.02% +1.58%
==========================================
Files 1354 1500 +146
Lines 295676 349932 +54256
Branches 40223 40228 +5
==========================================
+ Hits 107742 133047 +25305
- Misses 158661 187606 +28945
- Partials 29273 29279 +6 🚀 New features to boost your workflow:
|
jasonleenaylor
marked this pull request as draft
August 7, 2026 15:04
jasonleenaylor
force-pushed
the
native-coverage-opencppcoverage
branch
from
August 7, 2026 22:29
9c95a75 to
2849a1b
Compare
jasonleenaylor
force-pushed
the
native-coverage-opencppcoverage
branch
from
August 8, 2026 03:31
2849a1b to
c49ae6d
Compare
test.ps1 -Coverage passes -Coverage to Invoke-CppTest.ps1, which wraps the test exe with OpenCppCoverage and exports Output/<Configuration>/TestResults/native.<exe>.cobertura.xml with paths rewritten repo-relative so Codecov can match files. CI uploads the files under Codecov flag "native", separate from "managed". When the tool is missing the native tests run bare with a warning, and CI fails at the upload step instead of the test step. The post-summary grace kill is disabled under coverage because the export is written after the Unit++ summary prints; covered runs rely on TimeoutSeconds. Shared plumbing (assert-dialog env, crash-dialog suppression, Unit++ summary parsing) moved into FwBuildHelpers.psm1, and both Codecov uploads now go through the composite action .github/actions/codecov-upload, which owns the retry/verify sequence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jasonleenaylor
force-pushed
the
native-coverage-opencppcoverage
branch
from
August 8, 2026 04:46
c49ae6d to
6bd6f61
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.
test.ps1 -Coveragenow also collects native C++ coverage:Invoke-CppTest.ps1gains a-Coverageswitch that runstestGenericLib.exeandTestViews.exeunder OpenCppCoverage (debugger-based, needs only the build's PDBs, never rewrites binaries in the sharedOutput/<Configuration>folder) and exportsOutput/<Configuration>/TestResults/native.<exe>.cobertura.xml. CI uploads the files under Codecov flagnative, separate frommanaged.Specifics:
fixes:needed).choco install opencppcoverage, or envOpenCppCoveragePathfor a portable copy), native tests run bare with a[WARN]; CI then fails at the native upload step (fail_ci_if_error), never at the test step.FwBuildHelpers.psm1:Set-TestAssertDialogEnvironment,Disable-CrashDialog,Get-UnitppSummary,Find-OpenCppCoverage,Convert-CoberturaPathsToRepoRelative..github/actions/codecov-uploadowns the Codecov attempt/retry/verify sequence and the pinned action SHA; both the managed and native uploads use it.codecov.ymlignores the native Unit++ test sources (Src/Generic/Test,Src/views/Test).Measured: identical test results under coverage (testGenericLib
[31-0-0], TestViews[301-0-0], exit 0); ~4x native wall time (TestViews ~5s -> ~20s); ~51% native line coverage acrossViews.dll,DebugProcs.dll, and the statically linked Generic sources; ReportGenerator 5.3.11 parses the files alone and merged with the managed report. All CI checks pass, including the native Codecov upload.🤖 Generated with Claude Code
This change is