-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[6.2] test/CMakeLists.txt: run Embedded Swift for Wasm tests #83287
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
Merged
MaxDesiatov
merged 21 commits into
swiftlang:release/6.2
from
MaxDesiatov:maxd/setup-lit-args-6.2
Jul 26, 2025
Merged
[6.2] test/CMakeLists.txt: run Embedded Swift for Wasm tests #83287
MaxDesiatov
merged 21 commits into
swiftlang:release/6.2
from
MaxDesiatov:maxd/setup-lit-args-6.2
Jul 26, 2025
Conversation
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
@swift-ci test |
@swift-ci build toolchain |
@swift-ci test |
e094a35
to
1f8c9bb
Compare
@swift-ci test |
1 similar comment
@swift-ci test |
Currently `test/CMakeLists.txt` can only set `SWIFT_LIT_ARGS` for all tests uniformly. This means that we can't have tests for Embedded Swift with a different set of params. Let's refactor computation of `lit.py` options and arguments into a separate function, which means these params can set separately for different tests. In this change we're only using it once, but in the future we anticipate another use of `setup_lit_args` specifically for Embedded Swift testing. # Conflicts: # test/CMakeLists.txt
…wiftlang#82953) After swiftlang#82878 `SWIFT_LIT_ARGS` wasn't merged into correct returned variable in `setup_lit_args`, let's fix that to make sure that options like `-v --debug` are passed correctly from CLI `build-script` invocations or from presets that have these options predefined.
Run new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support both `-wasi` and `-wasip1` triples, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`. # Conflicts: # test/embedded/builtin-float.swift # test/embedded/dependencies-random.swift # test/embedded/float-abi-hard.swift # test/embedded/fragile-reference.swift # test/embedded/no-allocations-print.swift # test/embedded/optionset2.swift # test/embedded/ouroboros-bug.swift # test/embedded/static-object-non-darwin.swift # test/embedded/stdlib-array.swift # test/embedded/stdlib-basic.swift # test/embedded/stdlib-dictionary.swift # test/embedded/stdlib-random.swift # test/embedded/stdlib-set.swift # test/embedded/stdlib-strings-interpolation3.swift # test/embedded/stdlib-types.swift # test/embedded/traps-fatalerror-ir.swift
Fixes a regression introduced with swiftlang#83167 # Conflicts: # test/embedded/classes-generic-no-stdlib.swift # test/lit.cfg # test/stdlib/POSIX.swift # test/stdlib/simd_diagnostics.swift
# Conflicts: # test/stdlib/simd_diagnostics.swift
There's a predefined list of supported platforms that WASI should be added now that it has an official Embedded Swift SDK.
# Conflicts: # test/embedded/classes-generic-no-stdlib.swift
This fixes default `LLVM_LIT_ARGS` having values inconsistent with rest of the test targets configured by CMake.
# Conflicts: # test/embedded/builtin-float.swift # test/embedded/concurrency-simple.swift # test/embedded/dependencies-random.swift # test/embedded/float-abi-hard.swift # test/embedded/fragile-reference.swift # test/embedded/traps-fatalerror-ir.swift # test/lit.cfg
1c0f109
to
e00f8d2
Compare
@swift-ci smoke test linux |
@swift-ci test |
@swift-ci build toolchain |
@swift-ci build toolchain windows |
bnbarham
approved these changes
Jul 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
build-script
Area → utils: The build script
cmake
embedded
Embedded Swift
python
Flag: Python source code
swift 6.2
test suite
Area: test suite
WASI
WebAssembly System Interface support
WebAssembly
Platform: WebAssembly
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.
Cherry-pick of #83128, #82399, and #82878, merged as ea6ca2b, 0c4e561, and e34eb33 respectively.
Explanation: Currently
test/CMakeLists.txt
can only setSWIFT_LIT_ARGS
for all tests uniformly. This means that we can't have tests for Embedded Swift with a different set oflit.py
arguments.Also, create new
check-swift-embedded-wasi
target fromtest/CMakeLists.txt
, tweaklit.cfg
to support WASI Clang resource dir, exclude unsupported tests based onCPU=wasm32
instead ofOS=wasi
.Scope: Limited to Embedded Swift test suite.
Risk: Low, due to limited scope.
Testing: #82878 was incubated on
main
for 2 weeks, #82399 for 3 weeks with no disruption, #83128 merged this week, but enables all these tests on CI, which are consistently passing.Issue: rdar://156585717
Reviewer: @bnbarham