diff --git a/test/Driver/working-directory.swift b/test/Driver/working-directory.swift index b5ab72fab7f..4bff2b21833 100644 --- a/test/Driver/working-directory.swift +++ b/test/Driver/working-directory.swift @@ -67,7 +67,7 @@ // RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -Xcc -working-directory -Xcc %/t -c %/s | %FileCheck %s -check-prefix=CLANG // CLANG: -Xcc -working-directory -Xcc SOURCE_DIR -// CLANG-SAME: -Xcc -working-directory -Xcc BUILD_DIR +// CLANG-SAME: -Xcc -working-directory -Xcc TMP_DIR // RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_OBJ // OUTPUT_IMPLICIT_OBJ: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.o diff --git a/test/Macros/macro_plugin_broken_shlib.swift b/test/Macros/macro_plugin_broken_shlib.swift index eb5de20a97a..85686e6da54 100644 --- a/test/Macros/macro_plugin_broken_shlib.swift +++ b/test/Macros/macro_plugin_broken_shlib.swift @@ -18,8 +18,8 @@ // RUN: c-index-test -read-diagnostics %t/macro_expand.dia 2>&1 | %FileCheck -check-prefix SERVER %s // SERVER-NOT: {{error|warning}} -// SERVER: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/swift-plugin-server'; loader error: dlopen(BUILD_DIR/{{.*}}/libTestPlugin.dylib, {{.*}}): tried: 'BUILD_DIR/{{.*}}/plugins/libTestPlugin.dylib' -// SERVER: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/swift-plugin-server'; loader error: dlopen(BUILD_DIR/{{.*}}/libTestPlugin.dylib, {{.*}}): tried: 'BUILD_DIR/{{.*}}/plugins/libTestPlugin.dylib' +// SERVER: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'TMP_DIR/plugins/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/swift-plugin-server'; loader error: dlopen(TMP_DIR/plugins/libTestPlugin.dylib, {{.*}}): tried: 'TMP_DIR/plugins/libTestPlugin.dylib' +// SERVER: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'TMP_DIR/plugins/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/swift-plugin-server'; loader error: dlopen(TMP_DIR/plugins/libTestPlugin.dylib, {{.*}}): tried: 'TMP_DIR/plugins/libTestPlugin.dylib' // SERVER: test.swift:1:33: note: 'fooMacro' declared here // SERVER-NOT: {{error|warning}} @@ -34,8 +34,8 @@ // RUN: c-index-test -read-diagnostics %t/macro_expand_inproc.dia 2>&1 | %FileCheck -check-prefix INPROC %s // INPROC-NOT: {{error|warning}} -// INPROC: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/libSwiftInProcPluginServer.dylib'; loader error: dlopen(BUILD_DIR/{{.*}}/libTestPlugin.dylib, 0x0005): tried: 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' -// INPROC: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/libSwiftInProcPluginServer.dylib'; loader error: dlopen(BUILD_DIR/{{.*}}/libTestPlugin.dylib, 0x0005): tried: 'BUILD_DIR/{{.*}}/libTestPlugin.dylib' +// INPROC: test.swift:1:33: warning: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'TMP_DIR/plugins/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/libSwiftInProcPluginServer.dylib'; loader error: dlopen(TMP_DIR/plugins/libTestPlugin.dylib, 0x0005): tried: 'TMP_DIR/plugins/libTestPlugin.dylib' +// INPROC: test.swift:4:7: error: external macro implementation type 'TestPlugin.FooMacro' could not be found for macro 'fooMacro'; failed to load library plugin 'TMP_DIR/plugins/libTestPlugin.dylib' in plugin server 'BUILD_DIR/{{.*}}/libSwiftInProcPluginServer.dylib'; loader error: dlopen(TMP_DIR/plugins/libTestPlugin.dylib, 0x0005): tried: 'TMP_DIR/plugins/libTestPlugin.dylib' // INPROC: test.swift:1:33: note: 'fooMacro' declared here // INPROC-NOT: {{error|warning}} diff --git a/test/ModuleInterface/availability-scopes.swift b/test/ModuleInterface/availability-scopes.swift index 2985d88ada8..767ad530e89 100644 --- a/test/ModuleInterface/availability-scopes.swift +++ b/test/ModuleInterface/availability-scopes.swift @@ -4,7 +4,7 @@ // RUN: %target-swift-typecheck-module-from-interface(%t/Test.swiftinterface) -module-name Test -dump-availability-scopes 2>&1 | %FileCheck --strict-whitespace %s // RUN: %target-swift-frontend -compile-module-from-interface %t/Test.swiftinterface -o /dev/null -module-name Test -dump-availability-scopes 2>&1 | %FileCheck --strict-whitespace %s -// CHECK: {{^}}(root {{.*}} file={{.*}}{{/|\\}}availability-scopes.swift.tmp{{/|\\}}Test.swiftinterface +// CHECK: {{^}}(root {{.*}} file=TMP_DIR{{/|\\}}Test.swiftinterface // CHECK: {{^}} (decl {{.*}}unavailable=* decl=unavailable() @available(*, unavailable) public func unavailable() { } diff --git a/test/SILGen/magic_identifier_file_conflicting.swift.gyb b/test/SILGen/magic_identifier_file_conflicting.swift.gyb index 186f66dad59..2cfea7ca1a7 100644 --- a/test/SILGen/magic_identifier_file_conflicting.swift.gyb +++ b/test/SILGen/magic_identifier_file_conflicting.swift.gyb @@ -92,8 +92,8 @@ def fixit_loc(start_col, orig_suffix): // // CHECK-LABEL: // Mappings from '#fileID' to '#filePath': -// CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting.swift' => 'BUILD_DIR{{.*}}{{[/\\]}}test-{{[^/]+}}{{[/\\]}}SILGen{{[/\\]}}Output{{[/\\]}}magic_identifier_file_conflicting.swift.gyb.tmp{{[/\\]}}magic_identifier_file_conflicting.swift' -// CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting.swift' => 'BUILD_DIR{{.*}}{{[/\\]}}test-{{[^/]+}}{{[/\\]}}SILGen{{[/\\]}}Output{{[/\\]}}magic_identifier_file_conflicting.swift.gyb.tmp{{[/\\]}}other_path_b{{[/\\]}}magic_identifier_file_conflicting.swift' (alternate) +// CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting.swift' => 'TMP_DIR{{[/\\]}}magic_identifier_file_conflicting.swift' +// CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting.swift' => 'TMP_DIR{{[/\\]}}other_path_b{{[/\\]}}magic_identifier_file_conflicting.swift' (alternate) // CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting.swift' => 'magic_identifier_file_conflicting.swift' (alternate) // CHECK-NEXT: // 'Foo/magic_identifier_file_conflicting_other.swift' => 'SOURCE_DIR{{[/\\]}}test{{[/\\]}}SILGen{{[/\\]}}Inputs{{[/\\]}}magic_identifier_file_conflicting_other.swift' // CHECK-NEXT: // 'Foo/other_file_a.swift' => 'other_file_a.swift' diff --git a/test/ScanDependencies/binary_module_only.swift b/test/ScanDependencies/binary_module_only.swift index d3c553ba5ae..c0b611e820e 100644 --- a/test/ScanDependencies/binary_module_only.swift +++ b/test/ScanDependencies/binary_module_only.swift @@ -10,7 +10,7 @@ import Foo // BINARY_MODULE_ONLY: "swiftPrebuiltExternal": "Foo" // BINARY_MODULE_ONLY: "swiftPrebuiltExternal": { -// BINARY_MODULE_ONLY-NEXT: "compiledModulePath": "BUILD_DIR/{{.*}}/ScanDependencies/Output/binary_module_only.swift.tmp/binaryModuleOnly/Foo.swiftmodule", +// BINARY_MODULE_ONLY-NEXT: "compiledModulePath": "TMP_DIR/binaryModuleOnly/Foo.swiftmodule", // HAS_NO_COMPILED-NOT: "{{.*}}Foo.swiftmodule{{.*}}.swiftmodule" diff --git a/test/ScanDependencies/diagnose_dependency_cycle_shadow.swift b/test/ScanDependencies/diagnose_dependency_cycle_shadow.swift index 172a83ca741..275bb59c9a3 100644 --- a/test/ScanDependencies/diagnose_dependency_cycle_shadow.swift +++ b/test/ScanDependencies/diagnose_dependency_cycle_shadow.swift @@ -22,7 +22,7 @@ // RUN: not %target-swift-frontend -scan-dependencies -module-cache-path %t/module-cache %t/test.swift -o %t/deps.json -I %t/inputs -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -module-name CycleKit &> %t/out.txt // RUN: %FileCheck --check-prefix=CHECK-NONSDK %s < %t/out.txt -// CHECK-NONSDK: note: source target 'CycleKit' shadowing a Swift module with the same name at: '{{.*}}{{/|\\}}diagnose_dependency_cycle_shadow.swift.tmp{{/|\\}}inputs' +// CHECK-NONSDK: note: source target 'CycleKit' shadowing a Swift module with the same name at: 'TMP_DIR{{/|\\}}inputs' // SDK dependency shadowing // RUN: not %target-swift-frontend -scan-dependencies -module-cache-path %t/module-cache %t/test.swift -o %t/deps.json -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -module-name CycleKit -sdk %t/mock.sdk &> %t/out-sdk.txt diff --git a/test/ScanDependencies/explicit-module-map-clang-and-swift.swift b/test/ScanDependencies/explicit-module-map-clang-and-swift.swift index e0d1421d203..2148ff7d7fc 100644 --- a/test/ScanDependencies/explicit-module-map-clang-and-swift.swift +++ b/test/ScanDependencies/explicit-module-map-clang-and-swift.swift @@ -55,7 +55,7 @@ // RUN: %target-swift-frontend -emit-module -emit-module-path %t/Foo.swiftmodule -disable-implicit-swift-modules -module-cache-path %t.module-cache -explicit-swift-module-map-file %t/inputs/map.json -Rmodule-loading -Xcc -Rmodule-import %s 2>&1 | %FileCheck %s -// CHECK: :0: remark: importing module 'A' from {{.*}}{{/|\\}}explicit-module-map-clang-and-swift.swift.tmp{{/|\\}}inputs{{/|\\}}A.pcm' +// CHECK: :0: remark: importing module 'A' from 'TMP_DIR{{/|\\}}inputs{{/|\\}}A.pcm' import A diff --git a/test/ScanDependencies/preserve_used_vfs.swift b/test/ScanDependencies/preserve_used_vfs.swift index 54f3c92fc04..b8d88111495 100644 --- a/test/ScanDependencies/preserve_used_vfs.swift +++ b/test/ScanDependencies/preserve_used_vfs.swift @@ -131,34 +131,34 @@ func testIndirect() { funcRedirectedIndirect() } // CHECK: "-compile-module-from-interface" // CHECK: "-ivfsoverlay", // CHECK-NEXT: "-Xcc", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay.yaml", // CHECK-NEXT: "-Xcc", // CHECK-NEXT: "-ivfsoverlay", // CHECK-NEXT: "-Xcc", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay-2.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay-2.yaml", // CHECK: ], /// --------Clang module F // CHECK-LABEL: "modulePath": "{{.*}}{{/|\\}}F-{{.*}}.pcm", // CHECK: "commandLine": [ // CHECK: "-vfsoverlay", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay.yaml", // CHECK-NEXT: "-vfsoverlay", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay-2.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay-2.yaml", // CHECK: "-ivfsoverlay", // CHECK-NEXT: "-Xcc", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay.yaml", // CHECK-NEXT: "-Xcc", // CHECK-NEXT: "-ivfsoverlay", // CHECK-NEXT: "-Xcc", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay-2.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay-2.yaml", // CHECK: ] /// --------Clang module Indirect // CHECK-LABEL: "modulePath": "{{.*}}{{/|\\}}Indirect-{{.*}}.pcm", // CHECK-NOT: overlay.yaml // CHECK: "-vfsoverlay", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay-2.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay-2.yaml", // CHECK: "-ivfsoverlay", // CHECK-NEXT: "-Xcc", -// CHECK-NEXT: "{{.*}}{{/|\\}}preserve_used_vfs.swift.tmp{{/|\\}}overlay-2.yaml", +// CHECK-NEXT: "TMP_DIR{{/|\\}}overlay-2.yaml", diff --git a/test/ScanDependencies/separate_clang_scan_cache.swift b/test/ScanDependencies/separate_clang_scan_cache.swift index 324a601506b..f57de1c9dc4 100644 --- a/test/ScanDependencies/separate_clang_scan_cache.swift +++ b/test/ScanDependencies/separate_clang_scan_cache.swift @@ -10,6 +10,6 @@ // Ensure we the modules' output path is set to the module cache // CHECK-DEPS: "swift": "A" // CHECK-DEPS: "swift": "A" -// CHECK-DEPS: "modulePath": "{{.*}}separate_clang_scan_cache.swift.tmp.module-cache{{/|\\\\}}A-{{.*}}.swiftmodule" +// CHECK-DEPS: "modulePath": "TMP_DIR.module-cache{{/|\\\\}}A-{{.*}}.swiftmodule" import A diff --git a/test/ScanDependencies/separate_clang_scan_cache_bridging.swift b/test/ScanDependencies/separate_clang_scan_cache_bridging.swift index 18584c63f70..88b3c945d4c 100644 --- a/test/ScanDependencies/separate_clang_scan_cache_bridging.swift +++ b/test/ScanDependencies/separate_clang_scan_cache_bridging.swift @@ -14,12 +14,12 @@ // CHECK-DEPS: "clang": "F" // CHECK-DEPS-NEXT: }, // CHECK-DEPS-NEXT: { -// CHECK-DEPS-NEXT: "modulePath": "{{.*}}separate_clang_scan_cache_bridging.swift.tmp.module-cache{{/|\\\\}}F-{{.*}}.pcm" +// CHECK-DEPS-NEXT: "modulePath": "TMP_DIR.module-cache{{/|\\\\}}F-{{.*}}.pcm" // CHECK-DEPS: "swift": "A" // CHECK-DEPS-NEXT: }, // CHECK-DEPS-NEXT: { -// CHECK-DEPS-NEXT: "modulePath": "{{.*}}separate_clang_scan_cache_bridging.swift.tmp.module-cache{{/|\\\\}}A-{{.*}}.swiftmodule" +// CHECK-DEPS-NEXT: "modulePath": "TMP_DIR.module-cache{{/|\\\\}}A-{{.*}}.swiftmodule" diff --git a/test/SourceKit/Indexing/indexstore_multifile.swift b/test/SourceKit/Indexing/indexstore_multifile.swift index c41b0bf392d..e7fde4bc23f 100644 --- a/test/SourceKit/Indexing/indexstore_multifile.swift +++ b/test/SourceKit/Indexing/indexstore_multifile.swift @@ -17,7 +17,7 @@ struct Foo { // CHECK: indexstore_multifile.o-{{.*}} // CHECK: module-name: indexstoremodule // CHECK: main-path: SOURCE_DIR{{/|\\}}test{{/|\\}}SourceKit{{/|\\}}Indexing{{/|\\}}indexstore_multifile.swift -// CHECK: out-file: BUILD_DIR{{.*}}indexstore_multifile.o +// CHECK: out-file: TMP_DIR{{/|\\}}indexstore_multifile.o // CHECK: is-debug: 1 // CHECK: Unit | system | Swift | {{.*}}{{/|\\}}Swift.swiftmodule // CHECK: Record | user | SOURCE_DIR{{/|\\}}test{{/|\\}}SourceKit{{/|\\}}Indexing{{/|\\}}indexstore_multifile.swift | indexstore_multifile.swift-{{.*}}