Skip to content

Commit 7ce6ef4

Browse files
drodriguezNuriAmari
authored andcommitted
[test] Replace swift_obj_root for alternates that work in LLVM unified builds (#66167)
In LLVM unified builds `%swift_obj_root` points to `<LLVM build dir>/tools/swift`, and folders like `bin`, `lib` and `share` are not under `swift_obj_root`, which makes some tests fail. For the cases in which `%swift_obj_root/lib` was used, replace it by using `%swift-lib-dir` instead. Replicate `%swift-lib-dir` to create `%swift-bin-dir` and `%swift-share-dir`, and use those instead of `%swift_obj_root/bin` and `%swift_obj_root/share`. This alternates work both in Swift build-script builds and also in LLVM unified builds.
1 parent b06930d commit 7ce6ef4

17 files changed

+36
-32
lines changed

test/Concurrency/fail_implicit_concurrency_load.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// REQUIRES: concurrency
66
// RUN: %empty-directory(%t)
77
// RUN: mkdir -p %t/inputs
8-
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
9-
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
8+
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
9+
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
1010

1111
// RUN: echo "[{" > %/t/inputs/map.json
1212
// RUN: echo "\"moduleName\": \"Swift\"," >> %/t/inputs/map.json
@@ -16,13 +16,13 @@
1616
// RUN: echo "{" >> %/t/inputs/map.json
1717
// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json
1818
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
19-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
19+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
2020
// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json
2121
// RUN: echo "}," >> %/t/inputs/map.json
2222
// RUN: echo "{" >> %/t/inputs/map.json
2323
// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json
2424
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
25-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
25+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
2626
// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json
2727
// RUN: echo "}," >> %/t/inputs/map.json
2828
// RUN: echo "{" >> %/t/inputs/map.json

test/Demangle/objc-getclass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-clang %s -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -lswiftCore -lobjc -o %t/objc-getclass
2+
// RUN: %target-clang %s -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -lswiftCore -lobjc -o %t/objc-getclass
33
// RUN: %target-codesign %t/objc-getclass
44
// RUN: %target-run %t/objc-getclass %S/Inputs/objc-getclass.txt
55

test/Driver/LegacyDriver/legacy-driver-propagates-response-file-to-new-driver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
// REQUIRES: shell
77
// RUN: %{python} -c 'for i in range(500001): print("-DTEST5_" + str(i))' > %t.resp
8-
// RUN: cp %S/Inputs/print-args.sh %swift_obj_root/bin/legacy-driver-propagates-response-file.sh
8+
// RUN: cp %S/Inputs/print-args.sh %swift-bin-dir/legacy-driver-propagates-response-file.sh
99
// RUN: env SWIFT_USE_NEW_DRIVER=legacy-driver-propagates-response-file.sh %swiftc_driver_plain %s @%t.resp | %FileCheck %s
10-
// RUN: rm %swift_obj_root/bin/legacy-driver-propagates-response-file.sh
10+
// RUN: rm %swift-bin-dir/legacy-driver-propagates-response-file.sh
1111

1212
// CHECK: -Xfrontend
1313
// CHECK-NEXT: -new-driver-path

test/Frontend/module-alias-explicit-build.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/// Create a module Bar
88
// RUN: echo 'public func bar() {}' > %t/inputs/FileBar.swift
99
// RUN: %target-swift-frontend -module-name Bar %t/inputs/FileBar.swift -emit-module -emit-module-path %t/inputs/Bar.swiftmodule
10-
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
11-
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
10+
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
11+
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
1212

1313
/// Check Bar.swiftmodule is created
1414
// RUN: test -f %t/inputs/Bar.swiftmodule
@@ -39,13 +39,13 @@
3939
// RUN: echo "{" >> %/t/inputs/map.json
4040
// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json
4141
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
42-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
42+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4343
// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json
4444
// RUN: echo "}," >> %/t/inputs/map.json
4545
// RUN: echo "{" >> %/t/inputs/map.json
4646
// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json
4747
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
48-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
48+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4949
// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json
5050
// RUN: echo "}," >> %/t/inputs/map.json
5151
// RUN: echo "{" >> %/t/inputs/map.json

test/IRGen/conditional-dead-strip-exec.swift

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

66
// RUN: %target-build-swift -Xfrontend -conditional-runtime-records %s -emit-ir -o %t/main.ll
77

8-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
8+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
99
// RUN: %target-codesign %t/main
1010
// RUN: %target-run %t/main | %FileCheck %s
1111

test/IRGen/conditional-dead-strip-reflection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -Xfrontend -conditional-runtime-records %s -emit-ir -o %t/main.ll
3-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
3+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
44
// RUN: %target-swift-reflection-dump %t/main | %FileCheck %s
55

66
// FIXME(mracek): More work needed to get this to work on non-Apple platforms.

test/IRGen/virtual-function-elimination-exec.swift

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

55
// RUN: %empty-directory(%t)
66
// RUN: %target-build-swift -Xfrontend -enable-llvm-vfe %s -Onone -emit-ir -o %t/main.ll
7-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
7+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
88
// RUN: %target-codesign %t/main
99
// RUN: %target-run %t/main | %FileCheck %s
1010

test/IRGen/virtual-function-elimination-generics-exec.swift

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

55
// RUN: %empty-directory(%t)
66
// RUN: %target-build-swift -Xfrontend -enable-llvm-vfe %s -Onone -emit-ir -o %t/main.ll
7-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
7+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
88
// RUN: %target-codesign %t/main
99
// RUN: %target-run %t/main | %FileCheck %s
1010

test/IRGen/witness-method-elimination-exec-relative.swift

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

55
// RUN: %empty-directory(%t)
66
// RUN: %target-build-swift -Xfrontend -enable-llvm-wme %s -Onone -emit-ir -o %t/main.ll -Xfrontend -enable-relative-protocol-witness-tables
7-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
7+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
88
// RUN: %target-codesign %t/main
99
// RUN: %target-run %t/main | %FileCheck %s
1010

test/IRGen/witness-method-elimination-exec.swift

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

55
// RUN: %empty-directory(%t)
66
// RUN: %target-build-swift -Xfrontend -enable-llvm-wme %s -Onone -emit-ir -o %t/main.ll
7-
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
7+
// RUN: %target-clang %t/main.ll -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
88
// RUN: %target-codesign %t/main
99
// RUN: %target-run %t/main | %FileCheck %s
1010

test/Interpreter/lto_static_lib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -parse-as-library -lto=llvm-thin %s -emit-bc -o %t/a.o %lto_flags
33
// RUN: ar -r -s %t/archive.a %t/a.o
4-
// RUN: %target-clang %t/archive.a -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name -flto -o %t/main
4+
// RUN: %target-clang %t/archive.a -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main
55
// RUN: %target-run %t/main | %FileCheck %s
66

77
// REQUIRES: executable_test

test/PrintAsObjC/compatibility-symbols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %S/../Inputs/empty.swift -typecheck -emit-objc-header-path %t/empty.h
3-
// RUN: %clang -extract-api -o %t/empty.symbols.json --target=%target-triple -isysroot %clang-importer-sdk-path -F %clang-importer-sdk-path/frameworks --extract-api-ignores=%swift_obj_root/share/swift/compatibility-symbols -fmodules -x objective-c-header %t/empty.h
3+
// RUN: %clang -extract-api -o %t/empty.symbols.json --target=%target-triple -isysroot %clang-importer-sdk-path -F %clang-importer-sdk-path/frameworks --extract-api-ignores=%swift-share-dir/swift/compatibility-symbols -fmodules -x objective-c-header %t/empty.h
44
// RUN: %FileCheck %s --input-file %t/empty.symbols.json
55

66
// REQUIRES: objc_interop

test/Runtime/Paths.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: touch %t/swift-root/libexec/swift/Foo.exe
66
// RUN: touch %t/swift-root/bin/Foo.exe
77

8-
// RUN: %target-clang %s -std=c++11 -I %swift_src_root/include -I %swift_obj_root/include -I %swift_src_root/stdlib/public/SwiftShims -I %clang-include-dir -isysroot %sdk -L%swift_obj_root/lib/swift/%target-sdk-name/%target-arch -L%llvm_obj_root/lib/swift/%target-sdk-name/%target-arch -lswiftCore -o %t/paths-test
8+
// RUN: %target-clang %s -std=c++11 -I %swift_src_root/include -I %swift_obj_root/include -I %swift_src_root/stdlib/public/SwiftShims -I %clang-include-dir -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name/%target-arch -L%llvm_obj_root/lib/swift/%target-sdk-name/%target-arch -lswiftCore -o %t/paths-test
99
// RUN: %target-codesign %t/paths-test
1010
// RUN: %target-run %t/paths-test | %FileCheck %s
1111
// RUN: env %env-SWIFT_ROOT=%t/swift-root %target-run %t/paths-test | %FileCheck %s --check-prefix CHECK-FR

test/ScanDependencies/can_import_with_map.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// RUN: mkdir -p %t/inputs
55
// RUN: echo "public func foo() {}" >> %t/foo.swift
66
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/inputs/Foo.swiftmodule -emit-module-doc-path %t/inputs/Foo.swiftdoc -emit-module-source-info -emit-module-source-info-path %t/inputs/Foo.swiftsourceinfo -module-cache-path %t.module-cache %t/foo.swift -module-name Foo
7-
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
8-
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
7+
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
8+
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
99

1010
// RUN: echo "[{" > %/t/inputs/map.json
1111
// RUN: echo "\"moduleName\": \"Foo\"," >> %/t/inputs/map.json
@@ -37,13 +37,13 @@
3737
// RUN: echo "{" >> %/t/inputs/map.json
3838
// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json
3939
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
40-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
40+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4141
// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json
4242
// RUN: echo "}," >> %/t/inputs/map.json
4343
// RUN: echo "{" >> %/t/inputs/map.json
4444
// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json
4545
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
46-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
46+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4747
// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json
4848
// RUN: echo "}," >> %/t/inputs/map.json
4949
// RUN: echo "{" >> %/t/inputs/map.json

test/ScanDependencies/explicit-framework-irgen.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// RUN: echo "/// Some cool comments" > %t/foo.swift
55
// RUN: echo "public func foo() {}" >> %t/foo.swift
66
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/inputs/Foo.swiftmodule -emit-module-doc-path %t/inputs/Foo.swiftdoc -emit-module-source-info -emit-module-source-info-path %t/inputs/Foo.swiftsourceinfo -module-cache-path %t.module-cache %t/foo.swift -module-name Foo
7-
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
8-
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
7+
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
8+
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
99

1010
// RUN: echo "[{" > %/t/inputs/map.json
1111
// RUN: echo "\"moduleName\": \"Foo\"," >> %/t/inputs/map.json
@@ -37,13 +37,13 @@
3737
// RUN: echo "{" >> %/t/inputs/map.json
3838
// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json
3939
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
40-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
40+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4141
// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json
4242
// RUN: echo "}," >> %/t/inputs/map.json
4343
// RUN: echo "{" >> %/t/inputs/map.json
4444
// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json
4545
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
46-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
46+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4747
// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json
4848
// RUN: echo "}," >> %/t/inputs/map.json
4949
// RUN: echo "{" >> %/t/inputs/map.json

test/ScanDependencies/explicit-module-map-clang-and-swift.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// RUN: echo "public func anotherFuncA() {}" > %t/A.swift
66
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/inputs/A.swiftmodule -emit-module-doc-path %t/inputs/A.swiftdoc -emit-module-source-info -emit-module-source-info-path %t/inputs/A.swiftsourceinfo -import-underlying-module -I%S/Inputs/CHeaders -module-cache-path %t.module-cache %t/A.swift -module-name A
77
// RUN: %target-swift-emit-pcm -module-name A -o %t/inputs/A.pcm %S/Inputs/CHeaders/module.modulemap
8-
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
9-
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift_obj_root/lib/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
8+
// RUN: %target-swift-emit-pcm -module-name SwiftShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/SwiftShims.pcm
9+
// RUN: %target-swift-emit-pcm -module-name _SwiftConcurrencyShims %swift-lib-dir/swift/shims/module.modulemap -o %t/inputs/_SwiftConcurrencyShims.pcm
1010

1111
// RUN: echo "[{" > %/t/inputs/map.json
1212
// RUN: echo "\"moduleName\": \"A\"," >> %/t/inputs/map.json
@@ -38,13 +38,13 @@
3838
// RUN: echo "{" >> %/t/inputs/map.json
3939
// RUN: echo "\"moduleName\": \"SwiftShims\"," >> %/t/inputs/map.json
4040
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
41-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
41+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4242
// RUN: echo "\"clangModulePath\": \"%t/inputs/SwiftShims.pcm\"" >> %/t/inputs/map.json
4343
// RUN: echo "}," >> %/t/inputs/map.json
4444
// RUN: echo "{" >> %/t/inputs/map.json
4545
// RUN: echo "\"moduleName\": \"_SwiftConcurrencyShims\"," >> %/t/inputs/map.json
4646
// RUN: echo "\"isFramework\": false," >> %/t/inputs/map.json
47-
// RUN: echo "\"clangModuleMapPath\": \"%swift_obj_root/lib/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
47+
// RUN: echo "\"clangModuleMapPath\": \"%swift-lib-dir/swift/shims/module.modulemap\"," >> %/t/inputs/map.json
4848
// RUN: echo "\"clangModulePath\": \"%t/inputs/_SwiftConcurrencyShims.pcm\"" >> %/t/inputs/map.json
4949
// RUN: echo "}," >> %/t/inputs/map.json
5050
// RUN: echo "{" >> %/t/inputs/map.json

test/lit.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,9 @@ config.gyb = make_path(config.swift_utils, 'gyb.py')
352352
config.rth = make_path(config.swift_utils, 'rth') # Resilience test helper
353353
config.scale_test = make_path(config.swift_utils, 'scale-test')
354354
config.PathSanitizingFileCheck = make_path(config.swift_utils, 'PathSanitizingFileCheck')
355+
config.swift_bin_dir = make_path(config.swift, '..', '..', 'bin')
355356
config.swift_lib_dir = make_path(config.swift, '..', '..', 'lib')
357+
config.swift_share_dir = make_path(config.swift, '..', '..', 'share')
356358
config.round_trip_syntax_test = make_path(config.swift_utils, 'round-trip-syntax-test')
357359
config.refactor_check_compiles = make_path(config.swift_utils, 'refactor-check-compiles.py')
358360

@@ -551,7 +553,9 @@ config.host_build_swift = (
551553
)
552554

553555
config.substitutions.append( ('%llvm_obj_root', config.llvm_obj_root) )
556+
config.substitutions.append( ('%swift-bin-dir', config.swift_bin_dir) )
554557
config.substitutions.append( ('%swift-lib-dir', config.swift_lib_dir) )
558+
config.substitutions.append( ('%swift-share-dir', config.swift_share_dir) )
555559
config.substitutions.append( ('%swift-host-lib-dir', config.swift_host_lib_dir))
556560
config.substitutions.append( ('%llvm_src_root', config.llvm_src_root) )
557561
config.substitutions.append( ('%swift_obj_root', config.swift_obj_root) )

0 commit comments

Comments
 (0)