[Test] Add composition switcher test coverage + per-PR ge_current run - #11692
Open
Harini Malothu (HariniMalothu17) wants to merge 7 commits into
Open
[Test] Add composition switcher test coverage + per-PR ge_current run#11692Harini Malothu (HariniMalothu17) wants to merge 7 commits into
Harini Malothu (HariniMalothu17) wants to merge 7 commits into
Conversation
…system-composition Adds the composition switcher test coverage and the plumbing to run it under /p:SwitcherMode=true: - SwitcherTests.cpp/.h: engagement certifier + lifted->system composition path test (CompositionEngine::TrySetProcessEngine(System)). - ModuleCleanup.cpp: ModuleSetup engages the switcher when /p:SwitcherMode=true. - Utilities.cpp: IsSwitcherMode() + prefer .master.switcher.<ext> baselines (falls back to .master.<ext> so non-switcher runs are unaffected). - runtests.ps1: -SwitcherInputTests selection; SwitcherInputTests.txt list. - UpdateMasterFiles.ps1: -switcher writes .master.switcher.<ext> baselines. - GenerateHelixWorkItems.ps1 + WinUI-CreateHelixProjFile-Steps.yml: thread -SwitcherMode -> /p:SwitcherMode=true into the generated te.exe args. - tools/triage-switcher-failures.ps1: classify SWITCHER_REGRESSION vs NEEDS_SWITCHER_BASELINE. Switcher .master.switcher.* baselines are intentionally NOT included here; they are captured from the pipeline run (authoritative for the lab environment) in a follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3497b5d2-3a6c-44a7-8bb9-0204ef42b3da
Adds WinUI-RunSwitcherTests-Stage.yml: a self-contained stage (modeled on WinUI-PGO-Train-Stage.yml) that runs on a ge_current-vhdx_enterprise lab VM, builds the test payload, forces the switcher on via the RenderingEngine\Switcher GlobalOverride regkey, and runs the switcher tests with /p:SwitcherMode=true (WPF). Publishes the generated .save.xml trees so switcher baselines can be captured from the run. Wired into WinUI-PR.yml after RunTests. First run targets *SwitcherTests* (engagement certifiers); flip testSelector to "*" -TestsWithMasterFilesOnly for the full master-backed suite once green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 3497b5d2-3a6c-44a7-8bb9-0204ef42b3da
…fToken Adds the LAF unlock (TryUnlockFeature) in ModuleSetup reading the /p:SwitcherLafToken runtime parameter, wires the ge_current switcher stage into WinUI-GitHub-PR.yml, and passes the token from the WinUI-InternalFeed variable group (by name; value stays in ADO Library). No token/seed literal, no regkey, public CompositionEngine API only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c344c3ae-e1a7-47f8-b166-d00d1cfd5548
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
The branch's copies of three shared files predated changes on main and were removing unrelated, still-live code. Restore them so the PR is purely additive switcher coverage: - Utilities.cpp: restore SetImageCompareTolerance/GetImageCompareTolerance and SetDCompXmlVariable/ClearDCompXmlVariables/HasDCompXmlVariables (declared in Private.Infrastructure.idl + Utilities.h and called by TestComparisonGuards.h; removing the defs broke the build). - runtests.ps1: restore DisableXamlGeneratedMain* appx cleanup. - UpdateMasterFiles.ps1: restore copyright/license header (+ BOM). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c344c3ae-e1a7-47f8-b166-d00d1cfd5548
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Harini Malothu (HariniMalothu17)
marked this pull request as ready for review
August 28, 2026 10:28
Harini Malothu (HariniMalothu17)
requested a review
from a team
as a code owner
August 28, 2026 10:28
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
The self-repo template reference resolved file-relative (build/ + build/...), producing /build/build/AzurePipelinesTemplates/WinUI-RunSwitcherTests-Stage.yml. Qualify with @self so it resolves from repo root like the @WinUIInternal siblings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c344c3ae-e1a7-47f8-b166-d00d1cfd5548
… prefix) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c344c3ae-e1a7-47f8-b166-d00d1cfd5548
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c344c3ae-e1a7-47f8-b166-d00d1cfd5548
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.
What
Adds automated coverage for the lifted system composition switcher and runs it per-PR on a
ge_currentagent, engaging the switcher through the publicMicrosoft.UI.Composition.CompositionEngineAPI (TrySetProcessEngine(System)) — the same APIshipping controls like
InkCanvasuse.Why
The switcher (lifted → system composition engine) had no automated test coverage. These tests prove the
lifted→system routing engages end-to-end and let master-backed render tests run under the switched
backend, so regressions are caught in CI.
How it works
SwitcherTests.cpp/.h): an engagement certifier uses the publicCompositionEngine::GetForSystemEngineto verify the lifted compositor's system-engine equivalent is areal system compositor (proves routing, not a silent no-op). The backend flip is process-wide, so one
proof certifies the whole run.
ModuleCleanup.cpp): under/p:SwitcherMode=true, ModuleSetup callsTrySetProcessEngine(System)before any compositor is created.CompositionEngineis a Limited AccessFeature; ModuleSetup unlocks it via
TryUnlockFeature, reading the token from the/p:SwitcherLafTokenruntime parameter — supplied by the pipeline, never hardcoded.WinUI-RunSwitcherTests-Stage.yml, wired intoWinUI-GitHub-PR.yml): runs*SwitcherTests*on age_currentagent under-HostingMode:WPF /p:SwitcherMode=trueand publishesthe generated trees for baselining. The LAF token is referenced by name from an ADO Library
variable group.
Utilities.cpp): master selection prefers.master.switcher.<ext>and falls back to.master.<ext>. Switcher baselines are pipeline-generated and land in a follow-up PR (none committedhere).
Files
dxaml/test/native/external/foundation/graphics/rendering/SwitcherTests.cpp/.h— the tests.dxaml/test/native/external/infra/ModuleCleanup.cpp— SwitcherMode opt-in + LAF unlock.dxaml/test/infra/client/lib/Utilities.cpp—.master.switcher.*selection with fallback.build/AzurePipelinesTemplates/WinUI-RunSwitcherTests-Stage.yml— ge_current switcher stage.build/WinUI-GitHub-PR.yml— wires the stage into the GitHub PR pipeline.Helix/GenerateHelixWorkItems.ps1,build/AzurePipelinesTemplates/WinUI-CreateHelixProjFile-Steps.yml— SwitcherMode threading.
scripts/UpdateMasterFiles.ps1(-switcher),test/scripts/runtests.ps1(-SwitcherInputTests),test/scripts/SwitcherInputTests.txt,tools/triage-switcher-failures.ps1— helpers/roster.Testing
Switcher engages locally (3/3). The pipeline stage publishes results and is initially non-gating
(
failOnTestFailure: false) so it can't red-gate PRs until switcher baselines are captured; it flips togating in the baseline follow-up.
Notes for reviewers
CompositionEngineAPI.