Skip to content

Commit b67d5f0

Browse files
committed
test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper substitution in lit. This will make it easier to replace it appropriately with Windows equivalents.
1 parent 8ace7b8 commit b67d5f0

File tree

216 files changed

+260
-333
lines changed

Some content is hidden

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

216 files changed

+260
-333
lines changed

test/ClangImporter/private_frameworks.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
// FIXME: BEGIN -enable-source-import hackaround
54
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift

test/ClangImporter/system-framework-search-path.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// The clang module triggers a warning, make sure that -Fsystem has the effect of importing as system, which will suppress the warning.
22

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

65
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -F %S/Inputs/systemframeworks -module-cache-path %t/mcp1 %s 2> %t/stderr-as-user.txt
76
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -Fsystem %S/Inputs/systemframeworks -module-cache-path %t/mcp2 %s 2> %t/stderr-as-system.txt

test/Compatibility/MixAndMatch/witness_change.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) -emit-module -o %t/SomeObjCModule.swiftmodule -module-name SomeObjCModule -I %t -I %S/Inputs -swift-version 3 %S/Inputs/SomeObjCModuleX.swift
43
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/SomeSwift3Module.swiftmodule -module-name SomeSwift3Module -I %t -I %S/Inputs -swift-version 3 %s
54
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -o %t/SomeSwift4Module.swiftmodule -module-name SomeSwift4Module -I %t -I %S/Inputs -swift-version 4 %S/Inputs/witness_change_swift4.swift

test/Compatibility/bridging-nsnumber-and-nsvalue.swift.gyb

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: %gyb %s -o %t/bridging-nsnumber-and-nsvalue.swift
43
// RUN: %target-swift-frontend -typecheck -verify %t/bridging-nsnumber-and-nsvalue.swift -swift-version 3
54

test/Constraints/bridging-nsnumber-and-nsvalue.swift.gyb

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: %gyb %s -o %t/bridging-nsnumber-and-nsvalue.swift
43
// RUN: %target-swift-frontend -typecheck -verify %t/bridging-nsnumber-and-nsvalue.swift -swift-version 4
54

test/Frontend/sil-merge-partial-modules.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 -primary-file %s %S/Inputs/sil-merge-partial-modules-other.swift -module-name test -enable-resilience -o %t/partial.a.swiftmodule
54
// RUN: %target-swift-frontend -emit-module %s -primary-file %S/Inputs/sil-merge-partial-modules-other.swift -module-name test -enable-resilience -o %t/partial.b.swiftmodule

test/IRGen/autolink-coff-x86.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: %swift -target x86_64--windows-gnu -parse-as-library -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s
54
// RUN: %swift -target x86_64--windows-gnu -parse-as-library -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-GNU-IR

test/IRGen/cf.sil

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/chex.py < %s > %t/cf.sil
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil
44

test/IRGen/generic_classes.sil

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/chex.py < %s > %t/generic_classes.sil
33
// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
44
// RUN: %target-swift-frontend -Osize %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=OSIZE

test/IRGen/generic_structs.sil

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/chex.py < %s > %t/generic_structs.sil
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil
44

test/IRGen/generic_vtable.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/chex.py < %s > %t/generic_vtable.swift
33
// RUN: %target-swift-frontend %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefix=CHECK
44

test/IRGen/keypaths.sil

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
// -- Convert <i32 0x...> constants to decimal constants that LLVM will print
33
// RUN: %utils/chex.py < %s > %t/keypaths.sil
44
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %t/keypaths.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-os

test/IRGen/keypaths_objc.sil

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/chex.py < %s > %t/keypaths_objc.sil
33
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %t/keypaths_objc.sil | %FileCheck %t/keypaths_objc.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
44
// REQUIRES: objc_interop

test/IRGen/mixed_mode_class_with_unimportable_fields.sil

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 -o %t/UsingObjCStuff.swiftmodule -module-name UsingObjCStuff -I %t -I %S/Inputs/mixed_mode -swift-version 4 %S/Inputs/mixed_mode/UsingObjCStuff.swift
43
// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 3 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
54
// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

test/IRGen/mixed_mode_class_with_unimportable_fields.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 -o %t/UsingObjCStuff.swiftmodule -module-name UsingObjCStuff -I %t -I %S/Inputs/mixed_mode -swift-version 4 %S/Inputs/mixed_mode/UsingObjCStuff.swift
43
// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 3 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V3
54
// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V4

test/IRGen/objc_types_as_member.sil

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-irgen-test-overlays
33
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s
44

test/IRGen/two_tag_enums.swift.gyb

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: %gyb %s > %t/main.swift
43
// RUN: %target-swift-frontend -emit-ir %t/main.swift | %FileCheck %s
54

test/Index/Store/output-failure.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 %t
1+
// RUN: %empty-directory(%t)
22
// RUN: mkdir %t/idx
33

44
// Before indexing, do a dry-run to ensure any clang modules are cached. We

test/Index/Store/record-hashing.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 %t
1+
// RUN: %empty-directory(%t)
22
// RUN: echo "func foo() {}" > %t/theinput.swift
33

44
// RUN: %target-swift-frontend -index-store-path %t/idx -typecheck %t/theinput.swift -o %t/s.o

test/Index/Store/record-with-compile-error.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// XFAIL: linux
22

3-
// RUN: rm -rf %t
4-
// RUN: mkdir %t
3+
// RUN: %empty-directory(%t)
54
// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck %s -verify
65
// RUN: c-index-test core -print-record %t/idx | %FileCheck %s
76

test/Index/Store/unit-from-compile.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// XFAIL: linux
22

3-
// RUN: rm -rf %t
4-
// RUN: mkdir %t
3+
// RUN: %empty-directory(%t)
54
// RUN: %target-swift-frontend -c -index-store-path %t/idx %s -o %t/file1.o -module-name some_module_test
65
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s
76
// RUN: %target-swift-frontend -c -index-store-path %t/idx_opt %s -o %t/file1.o -module-name some_module_test -O

test/Index/Store/unit-multiple-sourcefiles.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
//===--- Building source files separately with a module merge at the end
44

5-
// RUN: rm -rf %t && mkdir %t
5+
// RUN: %empty-directory(%t)
66
// RUN: touch %t/s1.swift %t/s2.swift
77
// RUN: %target-swift-frontend -index-store-path %t/idx -primary-file %t/s1.swift %t/s2.swift -o %t/s1.o -c -module-name main -emit-module -emit-module-path %t/s1.swiftmodule
88
// RUN: %target-swift-frontend -index-store-path %t/idx %t/s1.swift -primary-file %t/s2.swift -o %t/s2.o -c -module-name main -emit-module -emit-module-path %t/s2.swiftmodule
@@ -11,7 +11,7 @@
1111

1212
//===--- Building source files together (e.g. WMO)
1313

14-
// RUN: rm -rf %t && mkdir %t
14+
// RUN: %empty-directory(%t)
1515
// RUN: touch %t/s1.swift %t/s2.swift
1616
// RUN: %target-swift-frontend -index-store-path %t/idx %t/s1.swift %t/s2.swift -o %t/s1.o -o %t/s2.o -c -module-name main -emit-module -emit-module-path %t/main.swiftmodule
1717
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s

test/Index/Store/unit-one-sourcefile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// RUN: %target-swift-frontend -index-store-path %t/idx %s -o %t/file1.o -typecheck
55
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s -check-prefix=FILE1
66

7-
// RUN: rm -rf %t && mkdir %t
7+
// RUN: %empty-directory(%t)
88
// RUN: touch %t/s2.swift
99
// RUN: %target-swift-frontend -index-store-path %t/idx -primary-file %s %t/s2.swift -o %t/file1.o -typecheck
1010
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s -check-prefix=FILE1
1111

12-
// RUN: rm -rf %t && mkdir %t
12+
// RUN: %empty-directory(%t)
1313
// RUN: touch %t/s2.swift
1414
// RUN: %target-swift-frontend -index-store-path %t/idx %s -primary-file %t/s2.swift -o %t/file2.o -typecheck
1515
// RUN: c-index-test core -print-unit %t/idx | %FileCheck %s -check-prefix=FILE2

test/Index/Store/unit-pcm-dependency.swift

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

1010
// FIXME: index the bridging header!
1111

12-
// RUN: rm -rf %t && mkdir %t
12+
// RUN: %empty-directory(%t)
1313
// RUN: echo 'import ClangModuleA' > %t/s2.swift
1414
// RUN: %target-swift-frontend -index-store-path %t/idx %s %t/s2.swift -o %t/s1.o -o %t/s2.o -I %S/Inputs -c -emit-module -module-name main -emit-module-path %t/main.swiftmodule -module-cache-path %t/mcp
1515
// RUN: c-index-test core -print-unit %t/idx > %t/both.txt

test/Index/Store/unit-swiftmodule-dependency.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 %t
1+
// RUN: %empty-directory(%t)
22

33
// RUN: %target-swift-frontend -index-store-path %t/idx %S/Inputs/SwiftModuleA.swift -emit-module -o %t/SwiftModuleA.swiftmodule
44
// RUN: %target-swift-frontend -index-store-path %t/idx %S/Inputs/SwiftModuleB.swift -emit-module -o %t/SwiftModuleB.swiftmodule -I %t

test/Index/Store/unit-with-bridging-header.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// XFAIL: linux
22

3-
// RUN: rm -rf %t
4-
// RUN: mkdir %t
3+
// RUN: %empty-directory(%t)
54
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-pch -index-store-path %t/idx -o %t/bridge-head.pch %S/Inputs/bridge-head.h
65
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -import-objc-header %t/bridge-head.pch -primary-file %s -o %t/s1.o -index-store-path %t/idx
76
// RUN: c-index-test core -print-record %t/idx | %FileCheck %s --check-prefix=PCH-RECORD

test/Index/index_module.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 -o %t %s
54
// RUN: %target-swift-ide-test -print-indexed-symbols -module-name index_module -source-filename %s > %t.out

test/Index/index_system_module.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 -o %t %S/Inputs/my_system_overlay/my_system_overlay.swift -Xcc -I -Xcc %S/Inputs/my_system_overlay
54
// RUN: %target-swift-ide-test -print-indexed-symbols -module-to-print my_system_overlay -source-filename %s -I %t -Xcc -I -Xcc %S/Inputs/my_system_overlay > %t.out

test/Index/roles.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 -o %t %S/Inputs/imported_swift_module.swift
54
// RUN: %target-swift-ide-test -print-indexed-symbols -source-filename %s -I %t | %FileCheck %s

test/Interpreter/SDK/mixed_mode_class_with_missing_properties.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 %s %t/main.swift
43
// RUN: %target-build-swift -whole-module-optimization -emit-module-path %t/UsingObjCStuff.swiftmodule -c -o %t/UsingObjCStuff.o -module-name UsingObjCStuff -I %t -I %S/Inputs/mixed_mode -swift-version 4 -parse-as-library %S/Inputs/mixed_mode/UsingObjCStuff.swift
54
// RUN: %target-build-swift -o %t/a.out.v3 -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 3 %t/main.swift %t/UsingObjCStuff.o

test/Interpreter/SDK/objc_swift3_deprecated_objc_inference.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-build-swift -swift-version 4 -Xfrontend -enable-swift3-objc-inference %s -o %t/a.out
33
// RUN: %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_WARNINGS
44
// RUN: env SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 SIMCTL_CHILD_SWIFT_DEBUG_IMPLICIT_OBJC_ENTRYPOINT=0 %target-run %t/a.out 2>&1 | %FileCheck %s -check-prefix=CHECK_NOTHING

test/Interpreter/conditional_conformances_runtime.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-build-swift %s -o %t/a.out
33
// RUN: %target-run %t/a.out
44
// REQUIRES: executable_test

test/Interpreter/enforce_exclusive_access.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-build-swift -swift-version 4 %s -o %t/a.out -enforce-exclusivity=checked -Onone
43
//
54
// RUN: %target-run %t/a.out

test/Interpreter/enforce_exclusive_access_backtrace.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-build-swift -swift-version 3 %s -o %t/a.out -enforce-exclusivity=checked -Onone
43
//
54
// RUN: %target-run %t/a.out 2>&1 | %FileCheck %s

test/Interpreter/objc_types_as_members.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-clang -fobjc-arc %S/Inputs/ObjCClasses/ObjCClasses.m -c -o %t/ObjCClasses.o
54
// RUN: %target-build-swift -O -I %S/Inputs/ObjCClasses/ -Xlinker %t/ObjCClasses.o %s -o %t/a.out

test/Interpreter/protocol_initializers.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-build-swift -swift-version 5 %s -o %t/a.out
43
//
54
// RUN: %target-run %t/a.out

test/Interpreter/protocol_initializers_class.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-build-swift -swift-version 5 %s -o %t/a.out
43
//
54
// RUN: %target-run %t/a.out

test/Interpreter/subclass_existentials.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
// RUN: rm -rf %t
14-
// RUN: mkdir -p %t
13+
// RUN: %empty-directory(%t)
1514
// RUN: %target-build-swift %s -o %t/a.out
1615
// RUN: %target-run %t/a.out
1716
// REQUIRES: executable_test

test/Interpreter/subclass_existentials_objc.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
// RUN: rm -rf %t
14-
// RUN: mkdir -p %t
13+
// RUN: %empty-directory(%t)
1514
// RUN: %target-build-swift %s -o %t/a.out
1615
// RUN: %target-run %t/a.out
1716
// REQUIRES: executable_test

test/Migrator/always_remove_old_remap_file.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: rm -rf %t && mkdir -p %t && cp %s %t/input.swift
1+
// RUN: %empty-directory(%t)
2+
// RUN: cp %s %t/input.swift
23
// RUN: %target-swift-frontend -c -update-code -primary-file %t/input.swift -emit-migrated-file-path %t/always_remove_old_remap_file.result -emit-remap-file-path %t/always_remove_old_remap_file.remap -o /dev/null
34
// RUN: ls %t/always_remove_old_remap_file.remap
45

test/Migrator/double_fixit_ok.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-frontend -typecheck %s -swift-version 3
2-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 3
2+
// RUN: %empty-directory(%t)
3+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 3
34
// RUN: diff -u %s.expected %t/double_fixit_ok.result
45
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 4
56

test/Migrator/double_fixit_ok.swift.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %target-swift-frontend -typecheck %s -swift-version 3
2-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 3
2+
// RUN: %empty-directory(%t)
3+
// RUN: %target-swift-frontend -typecheck -update-code -primary-file %s -emit-migrated-file-path %t/double_fixit_ok.result -swift-version 3
34
// RUN: diff -u %s.expected %t/double_fixit_ok.result
45
// RUN: %target-swift-frontend -typecheck %s.expected -swift-version 4
56

test/Migrator/no_double_edit_ast_pass.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// REQUIRES: OS=macosx
22
// REQUIRES: objc_interop
33
// RUN: %target-swift-frontend -typecheck %s -F %S/mock-sdk -swift-version 3
4-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -F %S/mock-sdk -api-diff-data-file %S/DoubleEditAPI.json -update-code -primary-file %s -emit-migrated-file-path %t/no_double_edit_ast_pass.result -swift-version 3 -o /dev/null
4+
// RUN: %empty-directory(%t)
5+
// RUN: %target-swift-frontend -c -F %S/mock-sdk -api-diff-data-file %S/DoubleEditAPI.json -update-code -primary-file %s -emit-migrated-file-path %t/no_double_edit_ast_pass.result -swift-version 3 -o /dev/null
56
// RUN: diff -u %s.expected %t/no_double_edit_ast_pass.result
67

78
import Bar

test/Migrator/no_double_edit_ast_pass.swift.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// REQUIRES: OS=macosx
22
// REQUIRES: objc_interop
33
// RUN: %target-swift-frontend -typecheck %s -F %S/mock-sdk -swift-version 3
4-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -F %S/mock-sdk -api-diff-data-file %S/DoubleEditAPI.json -update-code -primary-file %s -emit-migrated-file-path %t/no_double_edit_ast_pass.result -swift-version 3 -o /dev/null
4+
// RUN: %empty-directory(%t)
5+
// RUN: %target-swift-frontend -c -F %S/mock-sdk -api-diff-data-file %S/DoubleEditAPI.json -update-code -primary-file %s -emit-migrated-file-path %t/no_double_edit_ast_pass.result -swift-version 3 -o /dev/null
56
// RUN: diff -u %s.expected %t/no_double_edit_ast_pass.result
67

78
import Bar

test/Migrator/no_duplicate_aarch64_use_tbi.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// REQUIRES: OS=ios
22
// REQUIRES: CPU=arm64
33
// RUN: %target-swift-frontend -typecheck %s -swift-version 3
4-
// RUN: rm -rf %t && mkdir -p %t && cd %t && %swiftc_driver -c -update-code -target arm64-apple-ios10.3 -output-file-map %S/Inputs/no_duplicate_aarch64_use_tbi_ofm.json -swift-version 3 %s -v
4+
// RUN: %empty-directory(%t)
5+
// RUN: cd %t && %swiftc_driver -c -update-code -target arm64-apple-ios10.3 -output-file-map %S/Inputs/no_duplicate_aarch64_use_tbi_ofm.json -swift-version 3 %s -v
56
// RUN: cd %t && %swiftc_driver -c -update-code -target arm64-apple-ios10.3 -output-file-map %S/Inputs/no_duplicate_aarch64_use_tbi_ofm.json -swift-version 3 %s -### > %t/driver_actions.txt
67
// RUN: %FileCheck --check-prefix=CHECK-REMAP %s < %t/no_duplicate_aarch64_use_tbi.remap
78
// RUN: %FileCheck --check-prefix=CHECK-ACTIONS %s < %t/driver_actions.txt

test/Migrator/nsopengl_openglversion.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// REQUIRES: objc_interop
22
// REQUIRES: OS=macosx
33
// RUN: %target-swift-frontend -typecheck -swift-version 3 %s
4-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/nsopengl_openglversion.swift.result -o /dev/null
4+
// RUN: %empty-directory(%t)
5+
// RUN: %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/nsopengl_openglversion.swift.result -o /dev/null
56
// RUN: diff -u %S/nsopengl_openglversion.swift.expected %t/nsopengl_openglversion.swift.result
67
// RUN: %target-swift-frontend -typecheck -swift-version 4 %t/nsopengl_openglversion.swift.result
78

test/Migrator/nsopengl_openglversion.swift.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// REQUIRES: objc_interop
22
// REQUIRES: OS=macosx
33
// RUN: %target-swift-frontend -typecheck -swift-version 3 %s
4-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/nsopengl_openglversion.swift.result -o /dev/null
4+
// RUN: %empty-directory(%t)
5+
// RUN: %target-swift-frontend -c -update-code -disable-migrator-fixits -primary-file %s -emit-migrated-file-path %t/nsopengl_openglversion.swift.result -o /dev/null
56
// RUN: diff -u %S/nsopengl_openglversion.swift.expected %t/nsopengl_openglversion.swift.result
67
// RUN: %target-swift-frontend -typecheck -swift-version 4 %t/nsopengl_openglversion.swift.result
78

test/Migrator/rdar31892850.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: rm -rf %t && mkdir -p %t && %target-swift-frontend -typecheck -primary-file %s -module-cache-path %t/mcp -emit-remap-file-path %t/edits.remap
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -typecheck -primary-file %s -module-cache-path %t/mcp -emit-remap-file-path %t/edits.remap
23
// RUN: %FileCheck %s -input-file=%t/edits.remap
34

45
enum SomeStringEnum : String {
@@ -14,12 +15,12 @@ func foo() {
1415
// CHECK:[
1516
// CHECK: {
1617
// CHECK: "file": "{{.*}}rdar31892850.swift",
17-
// CHECK: "offset": 305,
18+
// CHECK: "offset": 306,
1819
// CHECK: "text": "SomeStringEnum(rawValue: "
1920
// CHECK: },
2021
// CHECK: {
2122
// CHECK: "file": "{{.*}}rdar31892850.swift",
22-
// CHECK: "offset": 309,
23+
// CHECK: "offset": 310,
2324
// CHECK: "text": ")!"
2425
// CHECK: }
2526
// CHECK:]

0 commit comments

Comments
 (0)