Skip to content

Commit 67c4be0

Browse files
committed
Update tests for wasi -> wasip1 triple change
Fixes a regression introduced with swiftlang#83167
1 parent 64a8bf8 commit 67c4be0

24 files changed

+39
-35
lines changed

test/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ foreach(SDK ${SWIFT_SDKS})
404404
set(VARIANT_EXTERNAL_EMBEDDED_PLATFORM FALSE)
405405
set(VARIANT_EXTERNAL_EMBEDDED_DEVICE)
406406

407+
# Reset these values for WASI, as Embedded Swift for WASI requires separate lit configs.
408+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_old ${SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB})
409+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING_old ${SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING})
410+
if(${SDK} STREQUAL "WASI")
411+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB OFF)
412+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING OFF)
413+
endif()
414+
407415
swift_configure_lit_site_cfg(
408416
"${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in"
409417
"${test_bin_dir}/lit.site.cfg"
@@ -426,6 +434,10 @@ foreach(SDK ${SWIFT_SDKS})
426434
"${test_bin_dir}/lit.swift-features.cfg"
427435
"${validation_test_bin_dir}/lit.swift-features.cfg")
428436

437+
# Restore old values in case they were reset for WASI tests lit configs.
438+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB ${SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_old})
439+
set(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING ${SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING_old})
440+
429441
set(test_dependencies)
430442
get_test_dependencies("${SDK}" test_dependencies)
431443

test/ClangImporter/availability_returns_twice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// UNSUPPORTED: OS=windows-msvc
44

55
// `setjmp` is not available on WebAssembly/WASI
6-
// UNSUPPORTED: OS=wasi
6+
// UNSUPPORTED: OS=wasip1
77

88
// https://github.com/apple/swift/issues/51632
99
// In Android jmp_buf is int[16], which doesn't convert to &Int

test/Concurrency/Runtime/continuation_validation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// UNSUPPORTED: back_deploy_concurrency
1313
// UNSUPPORTED: use_os_stdlib
1414
// UNSUPPORTED: freestanding
15-
// UNSUPPORTED: OS=wasi
15+
// UNSUPPORTED: OS=wasip1
1616

1717
import StdlibUnittest
1818

test/Concurrency/Runtime/exclusivity.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// REQUIRES: concurrency_runtime
88
// UNSUPPORTED: back_deployment_runtime
9-
// UNSUPPORTED: OS=wasi
9+
// UNSUPPORTED: OS=wasip1
1010
// UNSUPPORTED: back_deploy_concurrency
1111

1212
// This test makes sure that:
@@ -365,7 +365,7 @@ struct Runner {
365365
debugLog("==> Enter callee2")
366366
debugLog("==> Exit callee2")
367367
}
368-
368+
369369
// We add an inline never here to make sure that we do not eliminate
370370
// the dynamic access after inlining.
371371
@MainActor
@@ -374,7 +374,7 @@ struct Runner {
374374
debugLog("==> Enter callee1")
375375
let handle = Task { @MainActor in
376376
debugLog("==> Enter callee1 Closure")
377-
377+
378378
// These accesses end before we await in the task.
379379
do {
380380
callee2(&global1, &global2, &global3)
@@ -389,7 +389,7 @@ struct Runner {
389389
await handle.value
390390
debugLog("==> Exit callee1")
391391
}
392-
392+
393393
debugLog("==> Enter 'testCase1'")
394394
await callee1()
395395
debugLog("==> Exit 'testCase1'")

test/Concurrency/Runtime/exclusivity_custom_executors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// UNSUPPORTED: back_deploy_concurrency
1313

1414
// Crash expectations can't be implemented on WASI/WebAssembly.
15-
// UNSUPPORTED: OS=wasi
15+
// UNSUPPORTED: OS=wasip1
1616

1717
// This test makes sure that we properly save/restore access when we
1818
// synchronously launch a task from a serial executor. The access from the task

test/IRGen/async/hop_to_executor.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// WASI does not support the mandatory tail call, and needs to take the same
66
// path as CHECK-WIN, but will currently go down CHECK-SYSV, failing the test.
7-
// XFAIL: OS=wasi
7+
// XFAIL: OS=wasip1
88

99
sil_stage canonical
1010

test/IRGen/loadable_by_address_address_assignment.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
44

55
// wasm currently disables aggressive reg2mem
6-
// UNSUPPORTED: wasm
7-
// UNSUPPORTED: OS=wasi
86
// UNSUPPORTED: CPU=wasm32
97

108
public struct LargeThing {

test/IRGen/loadable_by_address_reg2mem.sil

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// RUN: %target-swift-frontend %s -Xllvm -sil-print-types -Xllvm -sil-print-after=loadable-address -import-objc-header %S/Inputs/large_c.h -c -o %t/t.o 2>&1 | %FileCheck %s
22

33
// wasm currently disables aggressive reg2mem
4-
// UNSUPPORTED: wasm
5-
// UNSUPPORTED: OS=wasi
64
// UNSUPPORTED: CPU=wasm32
75
// REQUIRES: PTRSIZE=64
86

test/IRGen/loadable_by_address_reg2mem_fixed_array.sil

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// REQUIRES: swift_feature_BuiltinModule
66

77
// wasm currently disables aggressive reg2mem
8-
// UNSUPPORTED: wasm
9-
// UNSUPPORTED: OS=wasi
108
// UNSUPPORTED: CPU=wasm32
119

1210
import Builtin

test/IRGen/run-coroutine_accessors.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
// REQUIRES: concurrency_runtime
9292

9393
// TODO: CoroutineAccessors: Enable on WASM.
94-
// UNSUPPORTED: wasm
95-
// UNSUPPORTED: OS=wasi
9694
// UNSUPPORTED: CPU=wasm32
9795

9896
// REQUIRES: swift_feature_CoroutineAccessors
@@ -243,7 +241,7 @@ struct Boxtional<T> : ResilientWrapping {
243241

244242
@available(SwiftStdlib 9999, *)
245243
class NonresilientResilientWrappingSubclass<X : ResilientWrapping> : ResilientWrappingClass<X.Wrapped> {
246-
init(_ impl: X) {
244+
init(_ impl: X) {
247245
self.impl = impl
248246
super.init()
249247
}

0 commit comments

Comments
 (0)