Repository navigation
Labels
area/buildCategorizes an issue or PR as relevant to build infrastructurearea/mvuxkind/maintainer-experienceCategorizes issue or PR as related to improving the experience of maintainers
Description
What
Add Android (emulator) and iOS (simulator) CI lanes for the _HotReload runtime tests, which currently only run on Skia desktop (stage-build-runtimetests-skia-hotreload.yml).
Why
unoplatform/uno#25417: MVUX hot reload was completely disabled on Android (Assembly.GetEntryAssembly() is null there), so model edits were reported applied but had no effect. Every existing MVUX hot-reload runtime test would have failed on Android, but none of them run there. Fix: #3235.
The gap has two causes:
stage-runtime-tests-android.yml/stage-runtime-tests-ios.ymlrun with the!_HotReloadfilter (also the default inbuild/test-scripts/android-emulator-runtime-tests.sh).- The HR test classes use
[RunsInSecondaryApp(ignoreIfNotSupported: true)]. The engine'sSecondaryApp.IsSupportedis Windows/Linux/FreeBSD only, so on mobile they're reported Skipped.
Why it's feasible
- No second process needed.
HotReloadHelper.UpdateSourceFilesends edits throughRemoteControlClient, which works from a device app. Only spawning the secondary app (plus its DevServer) is desktop-only. - The engine can run them in-process.
UnitTestsControl.IsSecondaryApp = truemakes HR test classes run in the current app.MobileRuntimeTestsAutostartalready drivesUnitTestsControldirectly and can set it.
Work needed
- DevServer next to the device. The DevServer compiles deltas for
net10.0-android/net10.0-ios, so the job running the tests needs the checkout, restore, mobile workloads, and a DevServer started againstUno.Extensions-runtimetests.slnf. Simplest is a single build+run job, since the app bakes the source project path (RuntimeTestsSourceProjectAttribute) at build time. - A hot-reload-capable app build:
- Debug, with the DevServer package
DOTNET_MODIFIABLE_ASSEMBLIES=debug:environment.confon Android,SIMCTL_CHILD_DOTNET_MODIFIABLE_ASSEMBLIESon iOS- Mono interpreter (
UseInterpreter=true). Check what the current CI APK build uses.
- Network path to the DevServer. Android:
adb reverse tcp:<port> tcp:<port>so the app reaches127.0.0.1. The iOS simulator shares host loopback. PassUNO_DEV_SERVER_HOST/UNO_DEV_SERVER_PORTthrough (AndroidMainActivityalready copies intent extras into env; iOS needs the same). Confirm the mobileRemoteControlClienthonours these. - Separate HR job per platform, filtered on
_HotReload, withIsSecondaryAppset, mirroring the Skia HR stage. - Triage Mono-specific failures. Mono's edit-and-continue support differs from CoreCLR's; fix each failing test or gate it explicitly per platform (no
Assert.Inconclusive).
Suggested order: Android first (the platform with the bug), then iOS.
Risks
- Memory: the emulator plus the DevServer's Roslyn workspace may be tight on a hosted Linux agent's RAM.
- Duration: the Android stage already needs a 120-minute timeout because SDK provisioning is slow.
Metadata
Metadata
Assignees
Labels
area/buildCategorizes an issue or PR as relevant to build infrastructurearea/mvuxkind/maintainer-experienceCategorizes issue or PR as related to improving the experience of maintainers
Activity
ci: run hot-reload runtime tests on Android and iOS