[test] Fix building Android tests on Windows toolchain CI#86694
[test] Fix building Android tests on Windows toolchain CI#86694finagolfin merged 1 commit intoswiftlang:mainfrom
Conversation
compnerd
left a comment
There was a problem hiding this comment.
Please limit this to just the Android builds. I don't think that we should add spurious options to other builds.
utils/build.ps1
Outdated
| -SwiftSDK $null ` | ||
| -BuildTargets check-swift-validation-only_non_executable ` | ||
| -Defines @{ | ||
| SWIFT_ANDROID_API_LEVEL = "$AndroidAPILevel"; |
There was a problem hiding this comment.
This Test-Runtime method is only invoked for Android currently, see the lit overrides 10 lines up where it skips several tests for Android.
There was a problem hiding this comment.
Please conditionalise it to Android anyway. Setting the environment variable isn't great, and something to fix. But this function is generic - $Platform identifies what platform it is being executed for. The goal is to use this for all platforms, not just Android.
Ever since swiftlang#84574 added Android availability versioning, the Reflection test stopped building for Android unless the API level was in the target triple, so we hacked that into CMake in that pull, but the Windows CI does not pass in `SWIFT_ANDROID_API_LEVEL`, like `build-script` does, so pass it in here when testing Android.
| $PlatformDefines = @{} | ||
| if ($Platform.OS -eq [OS]::Android) { | ||
| $PlatformDefines += @{ | ||
| SWIFT_ANDROID_API_LEVEL = "$AndroidAPILevel"; |
There was a problem hiding this comment.
Made the change you asked for
|
@swift-ci smoke test |
Made the change you asked for and would like to get this in now, so we can run it through Win toolchain CI.
… (#86839) Ever since #84574 added Android availability versioning, the Reflection test stopped building for Android unless the API level was in the target triple, so [we hacked that into CMake in that pull](https://github.com/swiftlang/swift/pull/84574/files#diff-e2e2a250882f66d531f2a42c201e013fa2d8be892b2880a32d6596710761f470R2549), but the Windows CI does not pass in `SWIFT_ANDROID_API_LEVEL`, [like `build-script` does](https://github.com/swiftlang/swift/blob/9143271dfdc92053a7b9d95000d9fd60e42413c3/utils/build-script-impl#L1632), so pass it in here.
…in CI again (#87275) This was fixed in #86694, but the subsequent massive #84906 appears to have [inadvertently disabled adding the needed Android API level](https://github.com/swiftlang/swift/pull/84906/changes#diff-c861caa2fcc08744108e542ca836b07e342f537566e8c5f7a21a0e9125331ed9R2774), as it was started late last year, long before the fix was added.
…in CI again (swiftlang#87275) This was fixed in swiftlang#86694, but the subsequent massive swiftlang#84906 appears to have [inadvertently disabled adding the needed Android API level](https://github.com/swiftlang/swift/pull/84906/changes#diff-c861caa2fcc08744108e542ca836b07e342f537566e8c5f7a21a0e9125331ed9R2774), as it was started late last year, long before the fix was added.
Ever since #84574 added Android availability versioning, the Reflection test stopped building for Android unless the API level was in the target triple, so we hacked that into CMake in that pull, but the Windows CI does not pass in
SWIFT_ANDROID_API_LEVEL, likebuild-scriptdoes, so pass it in here.I don't see a way to run the failing build of the Android tests from the Windows toolchain CI in this pull, so will just need review from Windows people like @compnerd or @jeffdav before merging.