Files
MobileGL/MobileGL/MG_IntegrationTest/Harness/SplitLogPaths.cmake.in
T

120 lines
7.9 KiB
CMake

# Included by CTest after all GoogleTest discovery files (ID-53).
# CTest appends ENVIRONMENT here; keep all previously discovered lane settings.
file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/split-logs")
file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/verify-split-logs")
# P5b t2's two lanes ride the same rule: one private log path per entry, or
# SplitLogPaths.PrivateAndDistinct is red for them (ID-53).
# P5e vi's client-array lane joins the same list for the same reason: its two entries are the
# only ones that can reach Fatal{UnmigratedVerb, "DrawArrays+CLIENT_ARRAYS"} once ra publishes
# the caps bit, and a shared log file is a marker nobody can attribute.
# P5e pa's strict lane joins it for the same reason as vi's: its four entries exist to CARRY a
# Fatal marker (the two program rows), and a shared log file is a marker nobody can attribute.
# P6 `t6`: ONE LIST FOR EVERY ENTRY THE SHARED REGISTRATION MACRO EMITS, on BOTH arms. The
# per-block TEST_LIST variables this replaces were a list somebody had to remember to extend;
# a block added without its variable got no private log and nothing said so until
# PrivateAndDistinct happened to notice. The macro accumulates instead.
# The macro's per-call lists, walked by NAME: gtest_discover_tests populates each of them when
# ctest runs, which is also when this file is included.
foreach(listName IN ITEMS @MGL_SPLIT_ARM_TEST_LISTS@)
foreach(entry IN LISTS ${listName})
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
if(entry MATCHES "TriangleScenario.TheServerStampedAVerbBoundaryOnThisDrawingFrame$")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MGITEST_STRICT_ARMING_LANE=1;MOBILEGL_PIPE_STATS=1;MOBILEGL_PIPE_STATS_PERIOD=1")
elseif(entry MATCHES "PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares$")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MGITEST_PMAP_LANE=1;MGITEST_PERSISTENT_MAP_ARM=emulated;MOBILEGL_PIPE_STATS=1;MOBILEGL_PIPE_STATS_PERIOD=1")
elseif(entry MATCHES "LargeArenaAdoptionScenario.TheArenaLandsInTheTierItsLaneDeclares$")
# P11 A2: every split arm runs T2, so the arena is declared emulated.
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MGITEST_PERSISTENT_MAP_ARM=emulated")
elseif(entry MATCHES "CtWireScenario\\.")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MOBILEGL_TEST_SERVER_COUNTERS=1")
endif()
endforeach()
endforeach()
# P7 package L tier 3: the whole-suite Magma census. A LIST OF ITS OWN, and the log path is the
# ONLY property it gets - the loop above also arms the strict-arming, pmap and server-counter
# lane markers by entry name, and a census is here to be READ, not to assert three unrelated
# oracles it never opted into. The path itself is not optional: these entries are
# DirectVulkan.{Split,Spawn,Tcp}. names, so split_log_paths.py's ownership gate requires exactly
# one absolute private path each, and on the spawn and tcp arms two processes append to it.
#
# ONE EXCEPTION, AND IT IS TELEMETRY RATHER THAN AN ORACLE: CtWireScenario reads the server's
# own control-record tallies, and without MOBILEGL_TEST_SERVER_COUNTERS=1 they are not published
# at all - the case then reds on `server control-record telemetry missing`, which says nothing
# about Magma. Measured: that is exactly what the spawn arm's ApplierReset case did on this
# tier's first run. A switch that makes a counter readable is not the same kind of thing as the
# strict-arming, pmap or persistent-map-arm markers above, which make a case ASSERT something it
# never opted into, and those stay out of the census.
foreach(listName IN ITEMS @MGL_MAGMA_FULL_TEST_LISTS@)
foreach(entry IN LISTS ${listName})
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
if(entry MATCHES "CtWireScenario\\.")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT "MOBILEGL_TEST_SERVER_COUNTERS=1")
endif()
endforeach()
endforeach()
# P7 wave 3 (V1): the verify comparator on the split arm. A LIST OF ITS OWN, like tier 3's and
# for tier 3's reason - the first loop also arms the strict-arming, pmap and server-counter lane
# markers by entry name, and this lane is here to compare fields, not to opt three unrelated
# oracles into a whole-binary set.
#
# THE PATH IS WHAT MAKES THE LANE ARMED RATHER THAN MERELY GREEN. These entries carry no
# MGITEST_SPLIT_LANE marker (MG_IntegrationTest/CMakeLists.txt says why: it reds 13 query-only
# cases that never move a verb), so the proof that the transport really resolved to inproc and
# that the comparator really armed is READ FROM THESE FILES by test.yml's verify-split job -
# ConfigLoader's `MOBILEGL_TRANSPORT=inproc` line and `MGPipe: verify armed`, per entry, in the
# CLIENT role's log. A shared path would make both unattributable, and under inproc the server
# role writes its own half of the same base name.
foreach(listName IN ITEMS @MGL_VERIFY_SPLIT_TEST_LISTS@)
foreach(entry IN LISTS ${listName})
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/verify-split-logs/${entry}.log")
endforeach()
endforeach()
foreach(entry IN LISTS MGL_SPLIT_PA_STRICT_DRAW_TESTS MGL_SPLIT_PA_STRICT_DISPATCH_TESTS)
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
endforeach()
foreach(scenario @MGL_SPLIT_SMALL_RING_SCENARIOS@)
foreach(entry IN LISTS MGL_SPLIT_SMALL_${scenario}_TESTS)
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
if(entry MATCHES "TriangleScenario.TheServerStampedAVerbBoundaryOnThisDrawingFrame$")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MGITEST_STRICT_ARMING_LANE=1;MOBILEGL_PIPE_STATS=1;MOBILEGL_PIPE_STATS_PERIOD=1")
elseif(entry MATCHES "PersistentCoherentMapScenario.TheMapLandsInTheArmItsLaneDeclares$")
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MGITEST_PMAP_LANE=1;MGITEST_PERSISTENT_MAP_ARM=emulated;MOBILEGL_PIPE_STATS=1;MOBILEGL_PIPE_STATS_PERIOD=1")
endif()
endforeach()
endforeach()
# d1's entries are covered by MGL_SPLIT_ARM_TESTS above (P6 `t6`).
# P5e mv's five tier-pinned lanes, the same rule for the same reason - and here it also repairs
# the addendum §4 blind spot for them: these entries carry a third name segment, so the strict
# census cannot re-derive their MOBILEGL_ESPRYT_MULTIDRAW_MODE, but a private log per entry means
# its marker can be read where the LANE wrote it instead of from a re-run that lost the pin.
foreach(tier @MGL_SPLIT_MULTIDRAW_TIERS@)
foreach(entry IN LISTS MGL_SPLIT_MULTIDRAW_${tier}_TESTS)
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
endforeach()
endforeach()
# P5b package i1's four scenarios, the same shape as the small-ring loop above: every
# DirectGLES.Split. entry owns exactly one absolute log path and shares it with nobody, which
# is what SplitLogPaths.PrivateAndDistinct checks over the discovered set.
# i1's entries are covered by MGL_SPLIT_ARM_TESTS above (P6 `t6`); the loop is kept as a no-op
# shell only so the surrounding prose still reads against a structure.
foreach(scenario "")
foreach(entry IN LISTS MGL_SPLIT_I1_${scenario}_TESTS)
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
endforeach()
endforeach()
# PersistentMapArm retains its existing private path and RESOURCE_LOCK: b1 reads it.