Repository navigation
ci: run the runtime tests on desktop, WebAssembly, Android and iOS - #3160
Merged
Merged
Conversation
4 of 7 tasks
kazo0
force-pushed
the
msal-1-ci-lanes
branch
3 times, most recently
from
August 25, 2026 15:37
f41379c to
0d5e6a2
Compare
Layer 1/4 of the MSAL authentication work (#3139): the device lanes, without any MSAL code. Build stages publish each head as a pipeline artifact; test stages boot an emulator / simulator / headless browser, run the engine with a namespace filter and harvest NUnit results. Ported from Studio Live's setup. - Four lanes (stage-runtime-tests-{desktop,wasm,android,ios}.yml) fed by stage-build-runtimetests-mobile.yml; scripts under build/test-scripts with bounded waits, inline emulator logs and a results validator that fails on an empty or all-skipped run - Runtime-test head: MobileRuntimeTestsAutostart drives UnitTestsControl and writes the NUnit document on Android/iOS (the engine's own runner throws PlatformNotSupportedException in a sandboxed app); WebAssemblyRuntimeShim supplies the __WASM__ symbol and InvokeJS the source-shipped engine needs; MainActivity uses GetExternalFilesDir for the results path; the iOS head carries the keychain entitlement MSAL's cache accessor demands - src/Directory.Build.targets exempts AndroidApplication heads from the library-only Private=false rule: .NET Android rewrites an app head's OutputType to Library, which emptied ReferenceCopyLocalPaths and shipped APKs without their ProjectReference closure - src/Directory.Build.props turns the trim/AOT analyzers off for test and sample projects; they only turned "this test calls the API it exists to test" into IL2026 errors on the WebAssembly heads - Given_NavigationRouteUpdateHandler (#3146, merged under this branch) becomes partial: the Android/iOS native-ctor generator emits a partial for it, and main never compiles the Navigation UI tests for a device TFM, so these lanes are the first build to see CS0260 - RuntimeTestsFilter is Storage.UI.Tests: green on every lane today. The MSAL namespace joins it in the next layer; '!_HotReload' waits on 15 rotted cases in the wider suite AGENTS.md records the new Window() rule (mobile rejects secondary windows); specs/lessons.md the CI lessons. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01EqfQh5ovrPEvFGcERLiLhH
ajpinedam
approved these changes
Aug 25, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
4 of 7 tasks
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.
GitHub Issue (If applicable): closes #3156 (layer 1/4 of #3155)
Stack 1/4 — base:
main. Review only this layer's diff. Top-down skim: #3155 lists the four layers; this is the bottom, and nothing above it lands until it does.PR Type
What is the current behavior?
No CI stage runs the runtime tests on any device.
src/Uno.Extensions.RuntimeTestshas a hot-reload lane on Skia desktop and nothing else; the WebAssembly, Android and iOS heads had never been built by CI, and two of them did not even compile (apartialand a copy-local defect, fixed in #3151 and here).What is the new behavior?
Four runtime-test lanes — desktop (Skia), WebAssembly, Android emulator, iOS simulator. Build stages publish each head as a pipeline artifact; test stages boot the target, run the engine with a namespace filter and harvest NUnit results. Ported from Studio Live's setup, with the failure modes it hit fixed on the way: bounded waits (an emulator that never registers used to eat the 120-minute job budget with no logs), inline emulator logs,
ANDROID_AVD_HOMEpinned soavdmanagerandemulatoragree, the signed APK picked deliberately, assemblies embedded in the Debug APK, and a results validator that fails an empty or all-skipped run.Runtime-test head plumbing:
MobileRuntimeTestsAutostartdrivesUnitTestsControland writes the NUnit document on Android/iOS (the engine's own runner callsConsole.CancelKeyPressand throws in a sandboxed app);WebAssemblyRuntimeShimsupplies the__WASM__symbol andInvokeJSthe source-shipped engine still branches on;MainActivityusesGetExternalFilesDirfor the results path; the iOS head carries the keychain entitlement MSAL's cache accessor demands on that platform.Two build fixes the lanes exposed:
src/Directory.Build.targetsexemptsAndroidApplicationheads from the library-onlyPrivate=falserule — .NET Android rewrites an app head'sOutputTypetoLibrary, which emptiedReferenceCopyLocalPathsand shipped APKs without theirProjectReferenceclosure; andsrc/Directory.Build.propsturns the trim/AOT analyzers off for test and sample projects, which are never published trimmed and only turned "this test calls the API it exists to test" intoIL2026errors on the WebAssembly heads.Filter:
RuntimeTestsFilterisStorage.UI.Tests(from #3153), green on every lane today. Layer 2 adds the MSAL namespace;!_HotReloadwaits on 15 rotted cases in the wider suite. The engine filter is a substring match with|for OR, so this must stay a namespace fragment — a class name silently drops its siblings.PR Checklist
AGENTS.md(thenew Window()rule for UI tests) andspecs/lessons.mdOther information
Verified locally: the desktop head builds and
Storage.UI.Testsruns 8/8 through it. The mobile autostart was also driven on the desktop head (it compiles for every head and is gated only onUITEST_RUNTIME_AUTOSTART_RESULT_FILE): the success path exits 0 with the 8 results written, an unwritable result path exits 1 with the exception and stack on stderr. The four lanes themselves were green on #3139 (builds 229724 onward) with this exact YAML; this PR is the first run of them againstmain.🤖 Generated with Claude Code
https://claude.ai/code/session_01EqfQh5ovrPEvFGcERLiLhH