File tree Expand file tree Collapse file tree 6 files changed +21
-14
lines changed Expand file tree Collapse file tree 6 files changed +21
-14
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift -emit-module -module-name Module %S/Inputs/loaded_module_trace_empty.swift -o %t/Module.swiftmodule
3
- // RUN: %target-build-swift -emit-module -module-name Module2 %S/Inputs/loaded_module_trace_imports_module.swift -o %t/Module2.swiftmodule -I %t
4
- // RUN: %target-build-swift %s -emit-loaded-module-trace -o %t/loaded_module_trace -I %t
2
+ // RUN: %empty-directory(%t/cache)
3
+ // RUN: %target-build-swift -emit-module -module-name Module %S/Inputs/loaded_module_trace_empty.swift -o %t/Module.swiftmodule -module-cache-path %t/cache
4
+ // RUN: %target-build-swift -emit-module -module-name Module2 %S/Inputs/loaded_module_trace_imports_module.swift -o %t/Module2.swiftmodule -I %t -module-cache-path %t/cache
5
+ // RUN: %target-build-swift %s -emit-loaded-module-trace -o %t/loaded_module_trace -I %t -module-cache-path %t/cache
5
6
// RUN: %FileCheck -check-prefix=CHECK %s < %t/loaded_module_trace.trace.json
6
7
// RUN: %FileCheck -check-prefix=CHECK-CONFIRM-ONELINE %s < %t/loaded_module_trace.trace.json
7
8
Original file line number Diff line number Diff line change 1
- // RUN: rm -f %t
2
- // RUN: env SWIFT_LOADED_MODULE_TRACE_FILE=%t %target-build-swift -module-name loaded_module_trace_env -c %s -o- > /dev/null
3
- // RUN: %FileCheck %s < %t
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t/cache)
3
+ // RUN: env SWIFT_LOADED_MODULE_TRACE_FILE=%t/trace %target-build-swift -module-name loaded_module_trace_env -c %s -o- -module-cache-path %t/cache > /dev/null
4
+ // RUN: %FileCheck %s < %t/trace
4
5
5
6
// CHECK: {
6
7
// CHECK: "version":2
Original file line number Diff line number Diff line change 1
- // RUN: %target-build-swift -o %t -module-name loaded_module_trace_foundation %s -emit-loaded-module-trace -emit-loaded-module-trace-path - 2>&1 | %FileCheck %s
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t/cache)
3
+ // RUN: %target-build-swift -o %t/trace -module-name loaded_module_trace_foundation %s -emit-loaded-module-trace -emit-loaded-module-trace-path - -module-cache-path %t/cache 2>&1 | %FileCheck %s
2
4
3
5
// REQUIRES: objc_interop
4
6
Original file line number Diff line number Diff line change 1
- // RUN: rm -f %t
2
- // RUN: env SWIFT_LOADED_MODULE_TRACE_FILE=%t %target-build-swift -module-name loaded_module_trace_header -c %s -o- -import-objc-header %S/Inputs/loaded_module_trace_header.h > /dev/null
3
- // RUN: %FileCheck %s < %t
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %empty-directory(%t/cache)
3
+ // RUN: env SWIFT_LOADED_MODULE_TRACE_FILE=%t/trace %target-build-swift -module-name loaded_module_trace_header -c %s -o- -import-objc-header %S/Inputs/loaded_module_trace_header.h -module-cache-path %t/cache > /dev/null
4
+ // RUN: %FileCheck %s < %t/trace
4
5
5
6
// REQUIRES: objc_interop
6
7
Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
- // RUN: %target-build-swift -emit-module -module-name Module %S/Inputs/loaded_module_trace_empty.swift -o %t/Module.swiftmodule
3
- // RUN: %target-build-swift -emit-module -module-name Module2 %S/Inputs/loaded_module_trace_empty.swift -o %t/Module2.swiftmodule
4
- // RUN: %target-build-swift %s %S/Inputs/loaded_module_trace_imports_module.swift -emit-loaded-module-trace-path %t/multifile.trace.json -emit-library -o %t/loaded_module_trace_multifile -I %t
2
+ // RUN: %empty-directory(%t/cache)
3
+ // RUN: %target-build-swift -emit-module -module-name Module %S/Inputs/loaded_module_trace_empty.swift -o %t/Module.swiftmodule -module-cache-path %t/cache
4
+ // RUN: %target-build-swift -emit-module -module-name Module2 %S/Inputs/loaded_module_trace_empty.swift -o %t/Module2.swiftmodule -module-cache-path %t/cache
5
+ // RUN: %target-build-swift %s %S/Inputs/loaded_module_trace_imports_module.swift -emit-loaded-module-trace-path %t/multifile.trace.json -emit-library -o %t/loaded_module_trace_multifile -I %t -module-cache-path %t/cache
5
6
// RUN: %FileCheck %s < %t/multifile.trace.json
6
7
7
8
// This file only imports Module2, but the other file imports Module: hopefully they both appear!
Original file line number Diff line number Diff line change 1
1
/// Test the -Rmodule-loading flag.
2
2
// RUN: %empty-directory(%t)
3
+ // RUN: %empty-directory(%t/cache)
3
4
4
5
/// Create a simple module and interface.
5
6
// RUN: echo 'public func publicFunction() {}' > %t/TestModule.swift
6
7
// RUN: %target-swift-emit-module-interface(%t/TestModule.swiftinterface) %t/TestModule.swift
7
8
8
9
/// Use -Rmodule-loading in a client and look for the diagnostics output.
9
- // RUN: %target-swift-frontend -typecheck %s -I %t -Rmodule-loading 2>&1 | %FileCheck %s
10
+ // RUN: %target-swift-frontend -typecheck %s -I %t -Rmodule-loading -module-cache-path %t/cache 2>&1 | %FileCheck %s
10
11
11
12
import TestModule
12
13
// CHECK: remark: loaded module at {{.*}}SwiftShims-{{.*}}.pcm
You can’t perform that action at this time.
0 commit comments