Skip to content

Commit a8e9ad3

Browse files
committed
Gate the swift-remoteast-test tests on the target matching the host.
swift-remoteast-test uses the JIT to execute code in its own process. Even if we theoretically taught the interpreter to perform some sort of remote interpretation, that would not be sufficient to make swift-remoteast-test work. Therefore I've introduced a new lit feature check specifically for swift-remoteast-test, but set it by default to be equivalent to swift_interpreter.
1 parent 596c290 commit a8e9ad3

File tree

6 files changed

+14
-1
lines changed

6 files changed

+14
-1
lines changed

test/RemoteAST/foreign_types.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-remoteast-test -sdk %S/../IRGen/Inputs %s | %FileCheck %s
22

3+
// REQUIRES: swift-remoteast-test
34
// REQUIRES: objc_interop
45

56
import CoreCooling

test/RemoteAST/member_offsets.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-remoteast-test %s | %FileCheck %s
22

3+
// REQUIRES: swift-remoteast-test
34
// REQUIRES: PTRSIZE=64
45

56
@_silgen_name("printTypeMemberOffset")

test/RemoteAST/nominal_types.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-remoteast-test %s | %FileCheck %s
22

3+
// REQUIRES: swift-remoteast-test
4+
35
@_silgen_name("printMetadataType")
46
func printType(_: Any.Type)
57

test/RemoteAST/objc_classes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-remoteast-test-with-sdk %s | %FileCheck %s
22

3-
// REQUIRES: swift_interpreter
3+
// REQUIRES: swift-remoteast-test
44
// REQUIRES: objc_interop
55

66
import Foundation

test/RemoteAST/structural_types.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %target-swift-remoteast-test %s | %FileCheck %s
22

3+
// REQUIRES: swift-remoteast-test
4+
35
@_silgen_name("printMetadataType")
46
func printType(_: Any.Type)
57

test/lit.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,13 @@ if platform.system() == 'Darwin' and (run_os == 'macosx' or run_os == 'darwin'):
528528
elif platform.system() == 'Linux':
529529
config.available_features.add('swift_interpreter')
530530

531+
# swift-remoteast-test requires the ability to compile and run code
532+
# for the system we compiled the swift-remoteast-test executable on.
533+
# This is potentially a stronger constraint than just "can we interpret",
534+
# but use that as an approximation for now.
535+
if 'swift_interpreter' in config.available_features:
536+
config.available_features.add('swift-remoteast-test')
537+
531538
config.target_swiftmodule_name = "unknown.swiftmodule"
532539
config.target_swiftdoc_name = "unknown.swiftdoc"
533540
config.target_runtime = "unknown"

0 commit comments

Comments
 (0)