Split protocol_test.cc into four translation units - #424
Merged
Merged
Conversation
protocol_test.cc was the longest test TU to compile and set the floor for a parallel build. Move the conformance tests, the protocol_view member function and views-of-protocols tests, and the protocol member function tests into their own files. Tests are moved unchanged. Part of #423.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #424 +/- ##
=======================================
Coverage 81.21% 81.21%
=======================================
Files 16 16
Lines 1299 1299
Branches 214 214
=======================================
Hits 1055 1055
Misses 45 45
Partials 199 199
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…lit-protocol-test-423
philipcraig
marked this pull request as ready for review
September 18, 2026 13:58
philipcraig
enabled auto-merge (squash)
September 18, 2026 13:58
The conversion function conformance tests added to protocol_test.cc on main move to conformance_tests.cc. protocol_operator_tests.cc joins the consteval coverage translation units ahead of protocol_test.cc, as on main.
jbcoe
approved these changes
Sep 18, 2026
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.
Part of #423.
Splits
protocol_test.ccby topic so that a change to one topic recompiles 11 to 21 s of tests rather than 50 s. This is for incremental rebuilds; it is not expected to change CI times, and the CI figures below show none. The tests themselves are unchanged.Per-TU compile time,
-O2 -c, GCC trunk 20260906 on a 2-core Codespaces VM:A full build does about 15 s more work, because each new TU pays the 4.8 s gtest and
protocol.hhbaseline again. That is why CI does not get faster: the shorter critical path only helps on a machine with more cores than TUs.CI, one run each, main (f01e297, scheduled) against this PR. The CMake figures are the ninja build span and, in brackets, the time until the last test object finished, both from log timestamps; these jobs have no build cache. The Bazel and sanitizer jobs restore a disk cache, so they are not compared. The differences are within run-to-run variation.
The consteval coverage script names its TUs, so its list gains
conformance_tests.ccandprotocol_view_tests.cc;protocol_member_function_tests.ccreaches no probe point the others miss and is left out. Coverage is unchanged at 194 of 216 probe points. Run back to back on the 2-core VM the probe takes 7m26 on main and 6m52 here; the CI probe step is slower in this one run, where #425, which has main's TU list, took 243 s.#421 and #356 add tests to
protocol_test.ccin regions that move, so whichever lands second needs its new tests re-homed.