Modernize XamlCompiler tests, Part II (test fixes only) - #11837
Evelyn Wu (evelynwu-msft) wants to merge 23 commits into
Conversation
Delete retired UWP, Visual Basic, back-compat, dirs-based, and obsolete native test assets that are unsupported by WinUI 3. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce shared project preambles, repository target frameworks, stable output paths, and deterministic Windows SDK resolution. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port the native regression fixtures and missing scenario pages needed to replace C++/CX-only coverage. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the remaining C++/CX projects and modernize desktop packaging, managed projections, package declarations, and incremental fixtures. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Share one target mapping between generation and comparison, fail safely on incomplete refreshes, and regenerate the available masters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the unit-test payload and proxies, restore current expectations, and cache reusable schema state without losing isolation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build authoring components for concrete architectures and repair WinUI TypeRef scopes in generated test WinMDs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the compiler built from the enlistment and add coverage for the C++/WinRT code-generation defects it exposes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Separate packaging intermediates, saved state, and duplicate fixture identities so sibling projects cannot contaminate each other. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Package the native BindTestbed directly, regenerate local-compiler masters, and re-enable all DiffCodegen cases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the current C++/WinRT test package, integrate regression builds into Build.cmd, and refresh affected generated masters. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add regression coverage that keeps the generated metadata-provider API stable between XAML compiler passes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Simplify the command-line runner, assemble a complete test payload, and add explicit standalone and ARM64EC build mappings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move test projects into their own solution and select codegen master roots from the active build flavor. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the existing checked masters under their flavor root and add the generated free-build baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Strengthen generated API and proxy checks, isolate outputs, make master refreshes atomic, and retain projection-header caching. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate the normal and incremental free-build baselines after the fixture removed four XAML lines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the refreshed BindTestbed masters byte-identical to compiler output after patch normalization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerate the normal and incremental xProperties masters after the fixture shifted two source locations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
| if not "%_nomock%"=="1" call :buildMockPackage | ||
| call :buildSolution %reporoot%\controls\MUXControls.sln /restore | ||
| if ERRORLEVEL 1 goto:showDurationAndExit | ||
| call :buildSolution %reporoot%\src\XamlCompiler\XamlCompilerTests.sln /restore |
There was a problem hiding this comment.
What is the increase to build time you see for this on your machine? You mentioned that maybe we'd need to make this not always run so default build.cmd isn't significantly slowed. Is this still something which you think needs to be addressed?
(If so, one idea would be an init.cmd flag, similar to "/nopgo" where this compile can be disabled for individual build windows.)
Mike Crider (codendone)
left a comment
There was a problem hiding this comment.
Changes look good, with the comment for a suggestion of later cleanup. I assume this PR will be changed to retarget main after #11836 is completed. I'll approve once this is retargeted.
| @@ -0,0 +1,70 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
Out of 715 files in the fre folder and 715 in the chk folder, only 35 files are different. This is a ton of duplication for these few differences. I suggest not blocking this PR for this, but it would be nice to have a follow-up change which either only forks the few projects which need a difference, or which allows override files to exist in the fre folder only for the files which have differences (this seems nicer).
…cts to flavors, fix up project platforms)
Fixes
Fixes #11835
PR Type
Description
Current Behavior
The XamlCompiler test tree still contains unsupported UWP, Visual Basic, C++/CX, back-compat, and dirs-based assets. Its projects use inconsistent build models and output paths, several regression scenarios cannot build against the local compiler, and codegen comparison coverage is incomplete.
The test and product projects also share solution/build plumbing, lack complete ARM64EC support, and use a single set of generated-code masters for both checked and free builds.
New Behavior
This PR:
chkandfremasters.The large file count is primarily legacy asset removal and generated-master migration. The commits keep generated baseline updates separate from test and infrastructure changes where practical.
Customer Impact
There is no user-facing or API change. This improves coverage and reliability for XamlCompiler changes by validating the supported WinUI 3 project models, architectures, and checked/free compiler outputs. Restoring XamlCompiler's test coverage allows future bug fixes to be made more quickly and confidently.
Regression Potential
The risk is limited to XamlCompiler test and build infrastructure, but the affected test matrix is broad.
Potential regressions are limited to XamlCompiler solution configuration, test packaging, generated-output comparison, and architecture-specific test builds.
How Has This Been Tested?
Validation performed:
amd64chk: XamlCompiler and test solutions build successfully.amd64fre: XamlCompiler and test solutions build successfully with PGO disabled.arm64ecchk: XamlCompiler and test solutions build successfully.amd64chkandamd64fre: all 28 DiffCodegen tests pass.Screenshots (if appropriate)
N/A — no visual changes.