Skip to content

Commit 81afe14

Browse files
committed
[Tests] Update tests for interpreter change to search /usr/lib/swift first for Swift libraries.
1 parent acf2c9f commit 81afe14

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

test/Driver/options-interpreter.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515

1616

1717
// RUN: %swift_driver -### -target x86_64-apple-macosx10.9 -resource-dir /RSRC/ %s | %FileCheck -check-prefix=CHECK-RESOURCE-DIR-ONLY %s
18-
// CHECK-RESOURCE-DIR-ONLY: # DYLD_LIBRARY_PATH=/RSRC/macosx{{$}}
18+
// CHECK-RESOURCE-DIR-ONLY: # DYLD_LIBRARY_PATH={{(/usr/lib/swift:)?}}/RSRC/macosx{{$}}
1919

2020
// RUN: %swift_driver -### -target x86_64-unknown-linux-gnu -resource-dir /RSRC/ %s | %FileCheck -check-prefix=CHECK-RESOURCE-DIR-ONLY-LINUX${LD_LIBRARY_PATH+_LAX} %s
2121
// CHECK-RESOURCE-DIR-ONLY-LINUX: # LD_LIBRARY_PATH=/RSRC/linux{{$}}
2222
// CHECK-RESOURCE-DIR-ONLY-LINUX_LAX: # LD_LIBRARY_PATH=/RSRC/linux{{$|:}}
2323

2424
// RUN: %swift_driver -### -target x86_64-apple-macosx10.9 -L/foo/ %s | %FileCheck -check-prefix=CHECK-L %s
25-
// CHECK-L: # DYLD_LIBRARY_PATH={{/foo/:[^:]+/lib/swift/macosx$}}
25+
// CHECK-L: # DYLD_LIBRARY_PATH={{/foo/:(/usr/lib/swift:)?[^:]+/lib/swift/macosx$}}
2626

2727
// RUN: %swift_driver -### -target x86_64-apple-macosx10.9 -L/foo/ -L/bar/ %s | %FileCheck -check-prefix=CHECK-L2 %s
28-
// CHECK-L2: # DYLD_LIBRARY_PATH={{/foo/:/bar/:[^:]+/lib/swift/macosx$}}
28+
// CHECK-L2: # DYLD_LIBRARY_PATH={{/foo/:/bar/:(/usr/lib/swift:)?[^:]+/lib/swift/macosx$}}
2929

3030
// RUN: env DYLD_LIBRARY_PATH=/abc/ %swift_driver_plain -### -target x86_64-apple-macosx10.9 -L/foo/ -L/bar/ %s | %FileCheck -check-prefix=CHECK-L2-ENV %s
31-
// CHECK-L2-ENV: # DYLD_LIBRARY_PATH={{/foo/:/bar/:[^:]+/lib/swift/macosx:/abc/$}}
31+
// CHECK-L2-ENV: # DYLD_LIBRARY_PATH={{/foo/:/bar/:(/usr/lib/swift:)?[^:]+/lib/swift/macosx:/abc/$}}
3232

3333
// RUN: %swift_driver -### -target x86_64-apple-macosx10.9 %s | %FileCheck -check-prefix=CHECK-NO-FRAMEWORKS %s
3434
// RUN: env DYLD_FRAMEWORK_PATH=/abc/ %swift_driver_plain -### -target x86_64-apple-macosx10.9 %s | %FileCheck -check-prefix=CHECK-NO-FRAMEWORKS %s
@@ -56,7 +56,7 @@
5656
// CHECK-COMPLEX: -F /bar/
5757
// CHECK-COMPLEX: #
5858
// CHECK-COMPLEX-DAG: DYLD_FRAMEWORK_PATH=/foo/:/bar/:/abc/{{$| }}
59-
// CHECK-COMPLEX-DAG: DYLD_LIBRARY_PATH={{/foo2/:/bar2/:[^:]+/lib/swift/macosx($| )}}
59+
// CHECK-COMPLEX-DAG: DYLD_LIBRARY_PATH={{/foo2/:/bar2/:(/usr/lib/swift:)?[^:]+/lib/swift/macosx($| )}}
6060

6161
// RUN: %swift_driver -### -target x86_64-unknown-linux-gnu -L/foo/ %s | %FileCheck -check-prefix=CHECK-L-LINUX${LD_LIBRARY_PATH+_LAX} %s
6262
// CHECK-L-LINUX: # LD_LIBRARY_PATH={{/foo/:[^:]+/lib/swift/linux$}}

test/Interpreter/repl_autolinking.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
// RUN: sed -n -e '/REPL_START$/,/REPL_END$/ p' %s > %t/repl.swift
55
// RUN: %target-swiftc_driver -emit-library %t/a.swift -I %t -L %t -emit-module-path %t/ModuleA.swiftmodule -autolink-force-load -module-link-name ModuleA -module-name ModuleA -o %t/libModuleA.dylib
66
// RUN: %target-swiftc_driver -emit-library %t/b.swift -I %t -L %t -emit-module-path %t/ModuleB.swiftmodule -autolink-force-load -module-link-name ModuleB -module-name ModuleB -o %t/libModuleB.dylib
7-
// RUN: %swift -repl -I %t -L %t < %t/repl.swift 2>&1 | %FileCheck %s
7+
// RUN: DYLD_LIBRARY_PATH=/usr/lib/swift %swift -repl -I %t -L %t < %t/repl.swift 2>&1 | %FileCheck %s
8+
9+
// FIXME: remove DYLD_LIBRARY_PATH from the last command when we fix the
10+
// interpreter's runtime library lookup.
811

912
// REQUIRES: swift_repl
1013
// UNSUPPORTED: OS=linux-gnu

0 commit comments

Comments
 (0)