Skip to content

Commit 88e1306

Browse files
committed
test: repair Interpreter/SDK/interpreter_with_options on ASi
Remove the target specific binary and instead compile a test binary on the fly. Because this test is restricted to macOS platforms, we know that we assume that we will have a compatible Objective-C runtime at our disposal. Use that to create a stub library for testing `NSClassFromString`. This allows this test to execute on ARM64.
1 parent ceeceaa commit 88e1306

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed
-8.48 KB
Binary file not shown.

test/Interpreter/SDK/interpret_with_options.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: echo "@interface ClassFromLibrary @end; @implementation ClassFromLibrary @end" | %clang -isysroot %sdk -Wno-objc-root-class -shared -o %t/libTestLoad.dylib -lobjc -x objective-c -
13
// RUN: %swift_driver -sdk %sdk %s | %FileCheck -check-prefix=WITHOUT-LIB %s
2-
// RUN: %swift_driver -sdk %sdk -L %S/Inputs/ -lTestLoad %s | %FileCheck -check-prefix=WITH-LIB %s
3-
// RUN: %swift_driver -sdk %sdk -L %S/Inputs/ -llibTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
4-
// RUN: %swift_driver -sdk %sdk -l%S/Inputs/libTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
5-
// RUN: cd %S && %swift_driver -sdk %sdk -lInputs/libTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
4+
// RUN: %swift_driver -sdk %sdk -L %t -lTestLoad %s | %FileCheck -check-prefix=WITH-LIB %s
5+
// RUN: %swift_driver -sdk %sdk -L %t -llibTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
6+
// RUN: %swift_driver -sdk %sdk -l%t/libTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
7+
// RUN: cd %S && %swift_driver -sdk %sdk -l%t/libTestLoad.dylib %s | %FileCheck -check-prefix=WITH-LIB %s
8+
69
// REQUIRES: OS=macosx
710
// REQUIRES: executable_test
811
// REQUIRES: swift_interpreter

0 commit comments

Comments
 (0)