You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that while cross-compiling some proportion of Testing tests has worked for a while now, long-standing SwiftPM bugs like swiftlang/swift-package-manager#8094 have broken cross-compiling this repo's tests to any platform, so the remaining steps here are blocked on those underlying bugs, which I'm told the new swift-build backend may soon fix. Instead, I have been occasionally natively building the trunk toolchain on Android in the Termux app then testing this repo, and with #1373 or an earlier patch, all tests passed.
@finagolfin@compnerd Any thoughts on how we can run our test suite automatically on Android as part of our GHA workflow suite? If we can do that and we can sort out instructions for at-desk testing, we can mark Android as fully supported I believe.
There are potentially two separate issues with cross-compiling Testing tests for Android:
We need to check if the recent swift-build switch in trunk SwiftPM fixed the problems with using macros, or if more work is needed in SwiftPM.
Once a test runner is successfully produced, it should just work with the current official workflows, which @marcprux already has working with Testing, provided packages don't define their own macros and avoid that long-standing SwiftPM bug.
We won't know if 2. works for sure till we fix 1., but the emulator testing probably works fine already.
We still can't cross-compile the Testing tests due to swiftlang/swift-package-manager#8094. I just tried again with 6.3.1 and got the expected failure:
For GHA CI, you can activate Android testing by just turning on enable_android_sdk_checks: true (in addition to enable_android_sdk_build: true, which is already enabled), but as expected, it also fails in my attempt: swift-android-sdk#1
To be clear, tests that useTesting do work fine on Android (provided the package under test does not define its own additional macros), but Testingitself cannot be tested in Android due to this issue. I hope it gets fixed someday!
It looks like this works with the switch to swift-build in 6.4 and the tests will be set up in #1745, once a few last tweaks are made. I don't know what "Set up team workstations or VMs" refers to, but this support will be ready soon.
It means code owners have some way to reliably run tests on Android at-desk (presumably in an emulator/simulator environment). Instructions for setting up such an environment can go in a new Documentation/Android.md file.
All that remains is the doc Jonathan asked for with the upcoming 6.4 release, as everything now works with the 6.4 snapshots, will submit a doc pull for that before closing this.
Activity
finagolfin commentedon Oct 22, 2025
Note that while cross-compiling some proportion of Testing tests has worked for a while now, long-standing SwiftPM bugs like swiftlang/swift-package-manager#8094 have broken cross-compiling this repo's tests to any platform, so the remaining steps here are blocked on those underlying bugs, which I'm told the new swift-build backend may soon fix. Instead, I have been occasionally natively building the trunk toolchain on Android in the Termux app then testing this repo, and with #1373 or an earlier patch, all tests passed.
grynspan commentedon Apr 18, 2026
@finagolfin @compnerd Any thoughts on how we can run our test suite automatically on Android as part of our GHA workflow suite? If we can do that and we can sort out instructions for at-desk testing, we can mark Android as fully supported I believe.
compnerd commentedon Apr 18, 2026
Yes, that is possible; https://github.com/compnerd/ds2 was running the tests on Android, so it is definitely possible to do in GHA.
finagolfin commentedon Apr 18, 2026
There are potentially two separate issues with cross-compiling Testing tests for Android:
swift-buildswitch in trunk SwiftPM fixed the problems with using macros, or if more work is needed in SwiftPM.Testing, provided packages don't define their own macros and avoid that long-standing SwiftPM bug.We won't know if 2. works for sure till we fix 1., but the emulator testing probably works fine already.
marcprux commentedon Apr 18, 2026
We still can't cross-compile the
Testingtests due to swiftlang/swift-package-manager#8094. I just tried again with 6.3.1 and got the expected failure:For GHA CI, you can activate Android testing by just turning on
enable_android_sdk_checks: true(in addition toenable_android_sdk_build: true, which is already enabled), but as expected, it also fails in my attempt: swift-android-sdk#1To be clear, tests that use
Testingdo work fine on Android (provided the package under test does not define its own additional macros), butTestingitself cannot be tested in Android due to this issue. I hope it gets fixed someday!finagolfin commentedon Jun 14, 2026
It looks like this works with the switch to
swift-buildin 6.4 and the tests will be set up in #1745, once a few last tweaks are made. I don't know what "Set up team workstations or VMs" refers to, but this support will be ready soon.grynspan commentedon Jun 15, 2026
It means code owners have some way to reliably run tests on Android at-desk (presumably in an emulator/simulator environment). Instructions for setting up such an environment can go in a new Documentation/Android.md file.
finagolfin commentedon Jul 17, 2026
All that remains is the doc Jonathan asked for with the upcoming 6.4 release, as everything now works with the 6.4 snapshots, will submit a doc pull for that before closing this.