From 3ab394e2b80e8da35f4c9ec13d699d7d8492f50c Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 6 Sep 2026 08:56:41 -0400 Subject: [PATCH] [Test] (Pipe): give the pull build the same ctest names as the push build so a push-only case skips instead of vanishing - G2 requires the pull and push ctest name sets to be identical, name for name. The two new suites had a single hand-written "SkippedInAPullBuild" placeholder each, which made the pull build 30 names short - a diff G2 exists to catch. - Each file now carries an X-macro list of its push-only suite.name pairs, expanded in the pull branch into cases that GTEST_SKIP. A case added on one side and forgotten on the other is a visible ctest-name diff rather than a test that silently is not there. - Measured with a CORRECTED gate command. The brief's G2/G14 grep is '^\s+Test #', which only matches a four-digit test number: ctest right-aligns the number, so tests 1..999 print as "Test #7:" with more than one space, and on this tree that silently dropped 999 of 2368 names - i.e. the gate as written passes while looking at 58% of the list. The pattern that works is '^ +Test +#[0-9]+: '. Both gates are green under it: 2396 names in the pull build and 2396 in the push build with a zero-line diff, and zero of the 2363 baseline names gone. --- MobileGL/MG_Test/Pipe/CsoCacheTest.cpp | 24 ++++++++++++++--- MobileGL/MG_Test/Pipe/TrackerTest.cpp | 36 +++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 6 deletions(-) diff --git a/MobileGL/MG_Test/Pipe/CsoCacheTest.cpp b/MobileGL/MG_Test/Pipe/CsoCacheTest.cpp index 33428849..d88520c7 100644 --- a/MobileGL/MG_Test/Pipe/CsoCacheTest.cpp +++ b/MobileGL/MG_Test/Pipe/CsoCacheTest.cpp @@ -29,9 +29,27 @@ using namespace MobileGL::MG_Pipe; namespace { #if !MOBILEGL_PIPE_PUSH - TEST(CsoCache, SkippedInAPullBuild) { - GTEST_SKIP() << "the CSO cache is compiled only under MOBILEGL_PIPE_PUSH"; - } + // G2 REQUIRES THE PULL AND PUSH CTEST NAME SETS TO BE IDENTICAL, name for name. A + // push-only case therefore cannot be ABSENT from a pull build; it has to be there and + // SKIP, which is the shape PipeInputsTest.cpp established for the same reason. This list + // declares exactly the suite.name pairs the push build gets from the real cases below, so + // a case added on one side and forgotten on the other shows up as a ctest-name diff + // rather than as a test that silently is not there. +#define MGL_CSO_CACHE_TEST_LIST(X) \ + X(CsoCacheTest, TheSameStateIsMintedOnceAndReusedForever) \ + X(CsoCacheTest, LruEvictsTheOldestAndEmitsDelete) \ + X(CsoCacheTest, HashCollisionDoesNotAliasTwoStates) \ + X(CsoCacheTest, ContentAddressingOffMintsEveryTime) \ + X(CsoCacheTest, EveryAcquireCountsItsPayloadBytes) \ + X(SetHashSuppressorTest, TheFirstEmissionAlwaysGoesOutOnEverySlot) \ + X(SetHashSuppressorTest, AComputedZeroIsRemappedSoItIsNeverConfusedWithNeverEmitted) \ + X(SetHashSuppressorTest, SlotsAreIndependent) \ + X(SetHashSuppressorTest, InvalidateMakesTheNextSetGoOutWhateverItHashesTo) + +#define MGL_DECLARE_PULL_SKIP(Suite, Name) \ + TEST(Suite, Name) { GTEST_SKIP() << "compiled only under MOBILEGL_PIPE_PUSH"; } + MGL_CSO_CACHE_TEST_LIST(MGL_DECLARE_PULL_SKIP) +#undef MGL_DECLARE_PULL_SKIP #else class CsoCacheTest : public ::testing::Test { protected: diff --git a/MobileGL/MG_Test/Pipe/TrackerTest.cpp b/MobileGL/MG_Test/Pipe/TrackerTest.cpp index 87f97694..2b44e79c 100644 --- a/MobileGL/MG_Test/Pipe/TrackerTest.cpp +++ b/MobileGL/MG_Test/Pipe/TrackerTest.cpp @@ -41,9 +41,39 @@ namespace { } #if !MOBILEGL_PIPE_PUSH - TEST(Tracker, SkippedInAPullBuild) { - GTEST_SKIP() << "the tracker is compiled only under MOBILEGL_PIPE_PUSH"; - } + // G2 REQUIRES THE PULL AND PUSH CTEST NAME SETS TO BE IDENTICAL, name for name. A + // push-only case therefore cannot be ABSENT from a pull build; it has to be there and + // SKIP, which is the shape PipeInputsTest.cpp established for the same reason. This list + // declares exactly the suite.name pairs the push build gets from the real cases below, so + // a case added on one side and forgotten on the other shows up as a ctest-name diff + // rather than as a test that silently is not there. +#define MGL_TRACKER_TEST_LIST(X) \ + X(TrackerAggregates, EveryAggregateStartsAtZero) \ + X(TrackerAggregates, AVertexArrayAttributeMovesOnlyTheVaoAggregate) \ + X(TrackerAggregates, AFramebufferObjectWriteMovesOnlyTheFramebufferAggregate) \ + X(TrackerAggregates, AFramebufferDefaultSetterMovesOnlyTheFramebufferAggregate) \ + X(TrackerAggregates, ATextureContentWriteMovesOnlyTheContentAggregate) \ + X(TrackerAggregates, ATextureParameterMovesOnlyTheParamsAggregate) \ + X(TrackerAggregates, ASamplerParameterMovesOnlyTheParamsAggregate) \ + X(TrackerAggregates, ABufferRespecifyMovesOnlyTheBufferAggregate) \ + X(TrackerAggregates, AVertexAttribDefaultMovesOnlyItsOwnAggregate) \ + X(TrackerAggregates, ANoteWithoutALiveContextIsANoOp) \ + X(TrackerWalk, EveryBitHasAName) \ + X(TrackerWalk, OnlyTheFiveEmittedBitsNameASubsystem) \ + X(TrackerWalk, TheFirstWalkOnAFreshContextPublishesEverything) \ + X(TrackerWalk, SteadyStateEmitsNothing) \ + X(TrackerWalk, BlendToggleReusesTwoCsos) \ + X(TrackerWalk, ViewportDoesNotMintACso) \ + X(TrackerWalk, WrapAroundRePushesButNeverMisses) \ + X(TrackerWalk, AggregateGenerationCatchesABoundTextureMoving) \ + X(TrackerWalk, ANaNPatchLevelEqualsItselfAndDoesNotFireForever) \ + X(TrackerWalk, ThePixelPackShutterIsAByteCompareOfThePackHalfOnly) \ + X(TrackerWalk, TheFireTalliesOnlyRunWhilePipeStatsIsOn) + +#define MGL_DECLARE_PULL_SKIP(Suite, Name) \ + TEST(Suite, Name) { GTEST_SKIP() << "compiled only under MOBILEGL_PIPE_PUSH"; } + MGL_TRACKER_TEST_LIST(MGL_DECLARE_PULL_SKIP) +#undef MGL_DECLARE_PULL_SKIP #else using GLContext = MG_State::GLState::GLContext;