Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows][toolchain] Run non-executable Swift Runtime tests for x86_64 Android #79185

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

weliveindetail
Copy link
Member

We cross-compile the Swift runtime libs for the Android SDKs in the Windows toolchain. This patch adds a build step that runs non-executable tests for them.

@weliveindetail
Copy link
Member Author

@swift-ci please test Windows

@weliveindetail
Copy link
Member Author

The build failed with an unrelated error and didn't reach the test stage. Investigating whether this is existing or due to my config adjustments for testing:

swift/Runtimes/Core/runtime/EnvironmentVariables.def:25:1: error: use of undeclared identifier 'parse_bool'
VARIABLE(SWIFT_DEBUG_ENABLE_METADATA_ALLOCATION_ITERATION, bool, false,
^
C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift/Runtimes/Core/runtime/EnvironmentVariables.cpp:205:9: note: expanded from macro 'VARIABLE'
        parse_##type(#name, buffer, defaultValue);              \
        ^

@weliveindetail weliveindetail force-pushed the windrd-test-nonexec-swift-runtime branch from 461698b to 7856bac Compare February 7, 2025 11:30
@weliveindetail
Copy link
Member Author

Rebased and skipped build of ExperimentalRuntime for Android for the moment. Let's see if that gets us to the test stage.

@swift-ci please test Windows

@weliveindetail
Copy link
Member Author

The build failed because the NEW setting for CMake policy CMP0157 isn't compatible with Swift's legacy driver. This is a known issue. Let's try again with the OLD setting in the respective dependencies.

swiftlang/swift-testing#944
swiftlang/swift-corelibs-foundation#5166
@swift-ci please test Windows

@weliveindetail
Copy link
Member Author

With the CMake policy workaround we successfully avoided the CMP0157 issue. However, the build had test failures for Swift Windows and thus didn't reach the test stage for Android:

Failed Tests (2):
  Swift(windows-x86_64) :: Interop/Cxx/stdlib/use-std-span.swift
  Swift(windows-x86_64) :: Interop/Cxx/stdlib/use-std-string-view.swift

@weliveindetail weliveindetail force-pushed the windrd-test-nonexec-swift-runtime branch from 7856bac to e53973c Compare February 17, 2025 11:25
@weliveindetail
Copy link
Member Author

@swift-ci please test Windows

This fixes 105 tests that don't get these parameters explicitly in run lines. They had been failing with:
```
error: missing required modules: 'SwiftOnoneSupport', '_Concurrency', '_StringProcessing'
```

Not sure this is Windows-specific, but let's assume other platforms work.
@weliveindetail
Copy link
Member Author

@weliveindetail
Copy link
Member Author

The missing required modules error was fixed in tests for symbol-graph-extract, but there are 4 more cases in swift-synthesize-interface and swift-frontend use cases.

Overall pass-rate is now above 50% for android-aarch64

Total Discovered Tests: 11245
  Unsupported        : 4648 (41.33%)
  Passed             : 6016 (53.50%)
  Expectedly Failed  :   29 (0.26%)
  Failed             :  550 (4.89%)
  Unexpectedly Passed:    2 (0.02%)

This fixes 71 tests for Android on Windows that previously failed with:
error: unable to load standard library for target 'x86_64-unknown-windows-msvc'
@weliveindetail
Copy link
Member Author

@weliveindetail
Copy link
Member Author

We didn't reach the test phase due to an unrelated build error in swift-corelibs-foundation:

Sources\Foundation\NSCalendar.swift:45:13: error: switch must be exhaustive

swiftlang/swift-testing#944
swiftlang/swift-corelibs-foundation#5166
@swift-ci please test Windows

This should fix around 250 tests that current fail with `command not found` in CI
@weliveindetail
Copy link
Member Author

@weliveindetail
Copy link
Member Author

Down to 187 failures

Testing Time: 961.20s

Total Discovered Tests: 11258
  Unsupported        : 4650 (41.30%)
  Passed             : 6390 (56.76%)
  Expectedly Failed  :   29 (0.26%)
  Failed             :  187 (1.66%)
  Unexpectedly Passed:    2 (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant