Skip to content

Commit 748339a

Browse files
authored
[test] Mark concurrency tests with appropiate REQUIRES. (#35624)
The Python build system always enables concurrency, but CMake has it disable by default. Collaborators that do not use the Python build system and use directly CMake will have it disable, unless they explicitely enable it. If the tests are not marked as requiring the concurrency features, the tests will fail to execute when concurrency is disabled. The changes add the `REQUIRES: concurrency` line to many tests that deal with concurrency, but wasn't marked as such.
1 parent 8799680 commit 748339a

File tree

8 files changed

+16
-1
lines changed

8 files changed

+16
-1
lines changed

test/IDE/complete_async_context.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -enable-experimental-concurrency
22

3+
// REQUIRES: concurrency
4+
35
func funcThrows() throws {
46
fatalError()
57
}

test/IDE/complete_asyncannotation.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -enable-experimental-concurrency
22

3+
// REQUIRES: concurrency
4+
35
func globalFuncAsync() async {}
46
func globalFuncAsyncThrows() async throws {}
57
func globalFuncAsyncRethrows(_ x: () async throws -> ()) async rethrows {}

test/IDE/complete_concurrency_keyword.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -enable-experimental-concurrency
22

3+
// REQUIRES: concurrency
4+
35
// CHECK_DECL: NOT
46

57
#^GLOBAL^#

test/IDE/complete_concurrency_specifier.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -enable-experimental-concurrency
22

3+
// REQUIRES: concurrency
4+
35
// SPECIFIER: Begin completions
46
// SPECIFIER-DAG: Keyword/None: async; name=async
57
// SPECIFIER-DAG: Keyword[throws]/None: throws; name=throws

test/SILOptimizer/optimize_hop_to_executor.sil

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-sil-opt -enable-sil-verify-all %s -optimize-hop-to-executor -enable-experimental-concurrency | %FileCheck %s
22

3+
// REQUIRES: concurrency
4+
35
sil_stage canonical
46

57
import Builtin

test/SourceKit/CursorInfo/cursor_info_concurrency.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ func test(act: MyActor) async throws {
1414
try await act.asyncFunc {}
1515
}
1616

17+
// REQUIRES: concurrency
18+
1719
// RUN: %empty-directory(%t)
1820
// RUN: %{python} %utils/split_file.py -o %t %s
1921

test/TBD/async-function-pointer.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// REQUIRES: VENDOR=apple
1+
// REQUIRES: VENDOR=apple
2+
// REQUIRES: concurrency
23
// RUN: %target-swift-frontend -emit-ir %s -enable-experimental-concurrency -validate-tbd-against-ir=all -module-name test | %FileCheck %s
34

45
// CHECK: @"$s4test6testityyYFTu" = hidden global %swift.async_func_pointer

validation-test/compiler_crashers_2_fixed/rdar71260972.sil

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-frontend %s -emit-ir -enable-experimental-concurrency -parse-sil
22

3+
// REQUIRES: concurrency
4+
35
import Swift
46

57
struct Pack {

0 commit comments

Comments
 (0)