Skip to content

Commit 89c4ab0

Browse files
authored
Merge pull request #10056 from CodaFi/mkdir-not-war
Add %empty-directory substitution
2 parents c5342a5 + 71bf312 commit 89c4ab0

File tree

651 files changed

+777
-953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

651 files changed

+777
-953
lines changed

docs/Testing.rst

Lines changed: 4 additions & 0 deletions

test/APINotes/irgen-prop-getter-setter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33

44
// RUN: %target-swift-frontend %clang-importer-sdk-nosource -I %t %s -emit-ir

test/APINotes/properties.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-module -source-filename %s -module-to-print=APINotesFrameworkTest -function-definitions=false -print-regular-comments -swift-version 4 | %FileCheck -check-prefix=CHECK-SWIFT-4 -check-prefix=CHECK-BOTH %s
44

test/APINotes/versioned-objc-dynamic-lookup.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 4 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-4 %s
44
// RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 3 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-3 %s
@@ -32,4 +32,4 @@ func testRenamedClassMembers(obj: AnyObject) {
3232
// CHECK-DIAGS-3: [[@LINE+1]]:{{[0-9]+}}: error: 'finalInstanceProperty' has been renamed to 'swift3InstanceProperty'
3333
_ = obj.finalInstanceProperty
3434
// CHECK-DIAGS-4-NOT: :[[@LINE-1]]:{{[0-9]+}}:
35-
}
35+
}

test/APINotes/versioned-objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 4 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-4 %s
44
// RUN: not %target-swift-frontend -typecheck -F %S/Inputs/custom-frameworks -swift-version 3 %s 2>&1 | %FileCheck -check-prefix=CHECK-DIAGS -check-prefix=CHECK-DIAGS-3 %s

test/APINotes/versioned-test-mangling.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// Use fake mangled names here with the name of the imported module.
44
// swift-ide-test isn't testing the full demangling algorithm.

test/APINotes/versioned.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-module -source-filename %s -module-to-print=APINotesFrameworkTest -function-definitions=false -print-regular-comments -swift-version 4 | %FileCheck -check-prefix=CHECK-SWIFT-4 %s
44

test/AutolinkExtract/import.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swiftc_driver -emit-library -emit-module -emit-module-path %t/empty.swiftmodule -module-name empty -module-link-name empty %S/empty.swift
43
// RUN: %target-swiftc_driver -c %s -I %t -o %t/import_experimental.o
54
// RUN: %target-swift-autolink-extract %t/import_experimental.o -o - | %FileCheck --check-prefix CHECK-%target-object-format %s

test/AutolinkExtract/import_archive.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swiftc_driver -emit-library -emit-module -emit-module-path %t/empty.swiftmodule -module-name empty -module-link-name empty %S/empty.swift
43
// RUN: %target-swiftc_driver -c %s -I %t -o %t/import_experimental.o
54
// RUN: llvm-ar cr %t/import_experimental.a %t/import_experimental.o

test/ClangImporter/MixedSource/broken-bridging-header.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: not %target-swift-frontend -typecheck %S/../../Inputs/empty.swift -import-objc-header %t/fake.h 2>&1 | %FileCheck -check-prefix=MISSING-HEADER %s
33

44
// RUN: cp %S/Inputs/error-on-define.h %t

test/ClangImporter/MixedSource/broken-modules.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: not %target-swift-frontend -typecheck %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt
33
// RUN: %FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s < %t/err.txt
44

test/ClangImporter/MixedSource/can_import_objc_idempotent.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

44
// FIXME: BEGIN -enable-source-import hackaround

test/ClangImporter/MixedSource/import-mixed-framework-with-forward.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: cp -r %S/Inputs/mixed-framework/Mixed.framework %t
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/%target-swiftmodule-name %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -disable-objc-attr-requires-foundation-module

test/ClangImporter/MixedSource/import-mixed-framework.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: cp -r %S/Inputs/mixed-framework/Mixed.framework %t
43

54
// Don't crash if a generated header is present but the swiftmodule is missing.

test/ClangImporter/MixedSource/import-mixed-with-header-twice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader -disable-objc-attr-requires-foundation-module

test/ClangImporter/MixedSource/import-mixed-with-header.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

44
// FIXME: BEGIN -enable-source-import hackaround

test/ClangImporter/MixedSource/resolve-cross-language.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32

43
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -emit-objc-header -o %t %S/Inputs/resolve-cross-language/Base.swift -disable-objc-attr-requires-foundation-module
54
// RUN: cp %S/Inputs/resolve-cross-language/Base-module.map %t/module.map

test/ClangImporter/attr-swift_private.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -typecheck %s -verify

test/ClangImporter/autolinking.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll
43
// RUN: %FileCheck %s < %t/without-adapter.ll
54

test/ClangImporter/broken-modules.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: not %target-swift-frontend -typecheck %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal -D MISSING_FROM_MODULE 2> %t/err.txt
44
// RUN: %FileCheck -check-prefix CHECK-MODULE-MAP %s < %t/err.txt

test/ClangImporter/cstring_parse.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Note: this test intentionally uses a private module cache.
22
//
3-
// RUN: rm -rf %t
4-
// RUN: mkdir -p %t
3+
// RUN: %empty-directory(%t)
54
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -module-cache-path %t/clang-module-cache -I %S/Inputs %s
65
// RUN: ls -lR %t/clang-module-cache | %FileCheck %s
76

test/ClangImporter/enum-error-execute.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-clang %S/Inputs/enum-error.m -c -o %t/enum-error.o
33
// RUN: %target-build-swift -import-objc-header %S/Inputs/enum-error.h -Xlinker %t/enum-error.o %s -o %t/a.out
44
// RUN: %target-run %t/a.out | %FileCheck %s

test/ClangImporter/mapped-integers.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %gyb %s -o %t/mapped-integers.swift
33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %t/mapped-integers.swift
44

test/ClangImporter/missing-adapter.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32

43
// RUN: %target-swift-frontend -emit-module -parse-as-library %S/Inputs/adapter.swift -sdk %S/Inputs -I %S/Inputs/custom-modules -module-name ClangModuleWithAdapter -o %t
54
// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -typecheck

test/ClangImporter/newtype_conformance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules -primary-file %S/Inputs/MoreSwiftNewtypes_conformances.swift %S/Inputs/MoreSwiftNewtypes_tests.swift -module-name MoreSwiftNewtypes
44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %S/Inputs/MoreSwiftNewtypes_conformances.swift -primary-file %S/Inputs/MoreSwiftNewtypes_tests.swift -module-name MoreSwiftNewtypes

test/ClangImporter/non-modular-include.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: not %target-swift-frontend -typecheck %s -I %S/Inputs/non-modular -F %S/Inputs/non-modular 2>&1 | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-runtime %s
33

44
// CHECK: {{.+}}/non-modular/Foo.framework/Headers/Foo.h:1:9: error: include of non-modular header inside framework module 'Foo'

test/ClangImporter/nullability_silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-silgen -I %S/Inputs/custom-modules %s | %FileCheck %s

test/ClangImporter/objc_bridging_custom.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift -module-name Appliances -o %t
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/../Inputs/ObjCBridging -I %t -parse-as-library -verify %s

test/ClangImporter/objc_factory_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -target x86_64-apple-macosx10.51 -typecheck %s -verify

test/ClangImporter/objc_ir.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s | %FileCheck %s
44

test/ClangImporter/objc_protocol_renaming.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// FIXME: BEGIN -enable-source-import hackaround
44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift

test/ClangImporter/objc_subscript.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %build-clang-importer-objc-overlays
33

44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -emit-sil -I %S/Inputs/custom-modules %s -verify

test/ClangImporter/pch-bridging-header-unittest-ok.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// REQUIRES: objc_interop
2-
// RUN: rm -rf %t && mkdir -p %t/tmp
2+
// RUN: %empty-directory(%t)
3+
// RUN: mkdir -p %t/tmp
34
// RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
45
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
56
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h

test/ClangImporter/pch-bridging-header-unittest-warn.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// REQUIRES: objc_interop
2-
// RUN: rm -rf %t && mkdir -p %t/tmp
2+
// RUN: %empty-directory(%t)
3+
// RUN: mkdir -p %t/tmp
34
// RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
45
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
56
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h

test/ClangImporter/pch-bridging-header.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// REQUIRES: objc_interop
2-
// RUN: rm -rf %t && mkdir -p %t/tmp
2+
// RUN: %empty-directory(%t)
3+
// RUN: mkdir -p %t/tmp
34

45
// First test the explicit frontend-based bridging PCH generation and use works
56
// RUN: %target-swift-frontend -emit-pch -o %t/sdk-bridging-header.pch %S/Inputs/sdk-bridging-header.h

test/ClangImporter/serialization-search-paths.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules -F %S/Inputs/frameworks -sdk "" -disable-objc-attr-requires-foundation-module %S/Inputs/SerializationHelper.swift
33
// RUN: %target-swift-frontend -typecheck -I %t %s -sdk "" -verify
44

test/ClangImporter/serialization-sil.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module-path %t/Test.swiftmodule -emit-sil -o /dev/null -module-name Test %s -sdk "" -import-objc-header %S/Inputs/serialization-sil.h
33
// RUN: %target-sil-func-extractor %t/Test.swiftmodule -sil-print-debuginfo -func=_T04Test16testPartialApplyySoAA_pF -o - | %FileCheck %s
44

test/ClangImporter/serialization.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift -sdk "" -disable-objc-attr-requires-foundation-module
43
// RUN: %target-swift-frontend -typecheck -sdk "" -I %t -I %S/Inputs/custom-modules %s -verify
54

test/ClangImporter/static_inline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// Check if SIL printing+parsing of a clang imported function works.
44

test/ClangImporter/submodules.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32

43
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -DIMPORT_TOP_LEVEL
54
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s

test/ClangImporter/submodules_indirect.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify -I %S/Inputs/custom-modules/ %s
43
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -o %t -emit-module -I %S/Inputs/custom-modules/ %s -module-name submodules
54
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck - -I %t -I %S/Inputs/custom-modules/

test/ClangImporter/submodules_scoped.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s -DCHECK_SCOPING
43
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t %s -module-name submodules
54
// RUN: echo 'import submodules; let s = "\(x), \(y)"' | %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck - -I %t

test/Compatibility/protocol_composition.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -typecheck -primary-file %t/swift3.swift %t/common.swift -verify -swift-version 3
44
// RUN: %target-swift-frontend -typecheck -primary-file %t/swift4.swift %t/common.swift -verify -swift-version 4

test/Compatibility/throws_identifier.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %utils/split_file.py -o %t %s
33
// RUN: %target-swift-frontend -parse -primary-file %t/swift3.swift -verify -swift-version 3
44
// RUN: %target-swift-frontend -parse -primary-file %t/swift4.swift -verify -swift-version 4

test/Constraints/diag_ambiguities_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_ambiguities.swift
33
// RUN: not %target-swift-frontend -typecheck %s -I %t 2>&1 | %FileCheck %s
44

test/Constraints/dynamic_lookup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module %S/Inputs/PrivateObjC.swift -o %t
33
// RUN: %target-typecheck-verify-swift -I %t -verify-ignore-unknown
44

test/DebugInfo/ASTSection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %target-build-swift -emit-executable %s -g -o %t/ASTSection -emit-module
44
// RUN: %lldb-moduleimport-test %t/ASTSection | %FileCheck %s

test/DebugInfo/ASTSection_ObjC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: cp %S/Inputs/serialized-objc-header.h %t
44
// RUN: %target-build-swift -emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module

test/DebugInfo/ASTSection_linker.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Run test ASTSection.swift, with separate compile and link steps.
22

3-
// RUN: rm -rf %t
4-
// RUN: mkdir -p %t
3+
// RUN: %empty-directory(%t)
54

65
// RUN: %target-swift-frontend -c -sdk /fake/sdk/path -Xcc -DA -Xcc -DB -emit-module -o %t %S/ASTSection.swift
76
// RUN: %swift-ide-test -test-CompilerInvocation-from-module -source-filename=%t/ASTSection.swiftmodule

test/DebugInfo/Imports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module-path %t/basic.swiftmodule %S/basic.swift
33

44
// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - | %FileCheck %s

test/DebugInfo/external-global.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module-path %t/Globals.swiftmodule %S/Globals.swift
33
// RUN: %target-swift-frontend -I %t %s -g -emit-ir -o - | %FileCheck %s
44
import Globals

test/DebugInfo/gsil.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend %s -O -gsil -Xllvm -sil-print-debuginfo -emit-ir -o %t/out.ir
33
// RUN: %FileCheck %s < %t/out.ir
44
// RUN: %FileCheck %s --check-prefix=CHECK_OUT_SIL < %t/out.ir.gsil_0.sil

test/DebugInfo/inlinescopes.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32
// RUN: echo "public var x = Int64()" \
43
// RUN: | %target-swift-frontend -module-name FooBar -emit-module -o %t -
54
// RUN: %target-swift-frontend %s -O -I %t -emit-ir -g -o %t.ll

test/DebugInfo/modulecache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22
// Clang-import a module.
33
import ClangModule
44

@@ -13,7 +13,7 @@ import ClangModule
1313

1414
// 2. Test that swift is creating clang modules with debug info.
1515

16-
// RUN: rm -rf %t && mkdir -p %t
16+
// RUN: %empty-directory(%t)
1717
// RUN: %target-swift-frontend %s -c -g -o %t.o -module-cache-path %t -I %S/Inputs
1818
// RUN: file %t/*/ClangModule-*.pcm | egrep '(Mach-O|ELF)'
1919

test/Demangle/lookup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_notASwiftSymbol
44

test/Driver/actions.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
32

43
// XFAIL: freebsd, linux
54

test/Driver/bindings.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %s 2>&1 | %FileCheck %s -check-prefix=BASIC
44
// BASIC: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "[[OBJECT:.*\.o]]"}

test/Driver/bridging-pch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: rm -rf %t && mkdir -p %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %swiftc_driver -typecheck -driver-print-actions -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=YESPCHACT
44
// YESPCHACT: 0: input, "{{.*}}Inputs/bridging-header.h", objc-header

0 commit comments

Comments
 (0)