Skip to content

Commit 1eea220

Browse files
committed
Use one module cache directory for all the lit tests to speed them up
Doing so is safe even though we have mock SDK. The include paths for modules with the same name in the real and mock SDKs are different, and the module files will be distinct (because they will have a different hash). This reduces test runtime on OS X by 30% and brings it under a minute on a 16-core machine. This also uncovered some problems with some tests -- even when run for iOS configurations, some tests would still run with macosx triple. I fixed the tests where I noticed this issue. rdar://problem/19125022 Swift SVN r23683
1 parent 5c011f4 commit 1eea220

File tree

456 files changed

+593
-971
lines changed

Some content is hidden

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

456 files changed

+593
-971
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ option(
204204
option(SWIFT_VERIFY_ALL "Run SIL verification after each transform when building Swift files in the build process" NO)
205205
option(SWIFT_STDLIB_USE_ASSERT_CONFIG_RELEASE "Should the stdlib be build with assert config set to release" NO)
206206
option(SWIFT_EMIT_SORTED_SIL "Sort SIL output by name to enable diffing of output" NO)
207+
208+
# FIXME: provide a default value
207209
set(SWIFT_MODULE_CACHE_PATH "" CACHE PATH
208210
"Directory to use as the Clang module cache when building Swift source files")
209211

test/1_stdlib/ArrayTraps.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: rm -rf %t ; mkdir -p %t
44
// RUN: %S/../../utils/gyb -DRUN_TESTS= %s -o %t/ArrayTraps.swift
55
// RUN: xcrun -sdk %target-sdk-name clang++ -arch %target-cpu %S/Inputs/CatchCrashes.cpp -c -o %t/CatchCrashes.o
6-
// RUN: %S/../../utils/line-directive %t/ArrayTraps.swift -- %target-build-swift -module-cache-path %t/clang-module-cache %t/ArrayTraps.swift -Xlinker %t/CatchCrashes.o -o %t/a.out
6+
// RUN: %S/../../utils/line-directive %t/ArrayTraps.swift -- %target-build-swift %t/ArrayTraps.swift -Xlinker %t/CatchCrashes.o -o %t/a.out
77
// RUN: %S/../../utils/gyb -DRUN_TESTS="%target-run %t/a.out" -DSOURCE=%s %s > /dev/null
88
//
99
// CHECK: OK

test/1_stdlib/BridgeStorage.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//
1717
//===----------------------------------------------------------------------===//
1818
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/out.swift
19-
// RUN: %S/../../utils/line-directive %t/out.swift -- %target-build-swift -parse-stdlib -module-cache-path %t/clang-module-cache %t/out.swift -o %t/a.out
19+
// RUN: %S/../../utils/line-directive %t/out.swift -- %target-build-swift -parse-stdlib %t/out.swift -o %t/a.out
2020
// RUN: %S/../../utils/line-directive %t/out.swift -- %target-run %t/a.out
2121

2222
import Swift

test/1_stdlib/Join.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/Join.swift
14-
// RUN: %S/../../utils/line-directive %t/Join.swift -- %target-build-swift -module-cache-path %t/clang-module-cache %t/Join.swift -o %t/a.out
14+
// RUN: %S/../../utils/line-directive %t/Join.swift -- %target-build-swift %t/Join.swift -o %t/a.out
1515
// RUN: %S/../../utils/line-directive %t/Join.swift -- %target-run %t/a.out
1616

1717
import StdlibUnittest

test/1_stdlib/NSStringAPI.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: rm -rf %t
22
// RUN: mkdir -p %t
3-
// RUN: %target-build-swift -module-cache-path %t/clang-module-cache %s -o %t/a.out
3+
// RUN: %target-build-swift %s -o %t/a.out
44
// RUN: %target-run %t/a.out
55

66
//

test/1_stdlib/NewArray.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//===----------------------------------------------------------------------===//
1313
// RUN-DISABLED: %target-run-simple-swift | FileCheck %s
1414
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/NewArray.swift
15-
// RUN: %S/../../utils/line-directive %t/NewArray.swift -- %target-build-swift -module-cache-path %t/clang-module-cache %t/NewArray.swift -o %t/a.out -Xfrontend -disable-access-control
15+
// RUN: %S/../../utils/line-directive %t/NewArray.swift -- %target-build-swift %t/NewArray.swift -o %t/a.out -Xfrontend -disable-access-control
1616
// RUN: %target-run %t/a.out 2>&1 | %S/../../utils/line-directive %t/NewArray.swift -- FileCheck %t/NewArray.swift
1717

1818
var xCount = 0

test/1_stdlib/UnsafePointer.swift.gyb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/UnsafePointer.swift
2-
// RUN: %S/../../utils/line-directive %t/UnsafePointer.swift -- %target-build-swift -module-cache-path %t/clang-module-cache %t/UnsafePointer.swift -o %t/a.out
2+
// RUN: %S/../../utils/line-directive %t/UnsafePointer.swift -- %target-build-swift %t/UnsafePointer.swift -o %t/a.out
33
// RUN: %S/../../utils/line-directive %t/UnsafePointer.swift -- %target-run %t/a.out
44

55
import StdlibUnittest

test/1_stdlib/VarArgs.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift -interpret -parse-stdlib -module-cache-path %t/clang-module-cache -sdk %sdk -target %target-triple %s | FileCheck %s
1+
// RUN: %swift -interpret -parse-stdlib -sdk %sdk -target %target-triple %s | FileCheck %s
32
// REQUIRES: swift_interpreter
43
// REQUIRES: sdk
54

test/APINotes/blocks.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -module-cache-path %t/clang-module-cache %s -emit-ir
1+
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk %s -emit-ir
32

43
import UIKit
54

@@ -12,4 +11,4 @@ class MyView: UIView {
1211
animations:{println("animating")},
1312
completion: nil);
1413
}
15-
}
14+
}

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -module-cache-path %t/clang-module-cache %s -emit-ir
1+
// RUN: %target-build-swift -Xfrontend %clang-importer-sdk %s -emit-ir
32

43
// Test that we don't crash when producing IR.
54

@@ -14,4 +13,4 @@ class MyView: NSView {
1413
}
1514
}
1615
var m = MyView()
17-
m.drawRect()
16+
m.drawRect()

test/ClangModules/MixedSource/broken-modules.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// RUN: rm -rf %t && mkdir -p %t
2-
// RUN: not %swift -parse %s -I %S/Inputs/broken-modules/ -module-cache-path %t -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt
2+
// RUN: not %swift -parse %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

5-
// RUN: not %swift -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -module-cache-path %t -enable-source-import 2> %t/err.bridging-header.txt
5+
// RUN: not %swift -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt
66
// RUN: FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s < %t/err.bridging-header.txt
77

8-
// RUN: not %swift -parse %s -import-objc-header %t/fake.h -module-cache-path %t 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s
8+
// RUN: not %swift -parse %s -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s
99

10-
// RUN: not %swift -parse %s -import-objc-header %S/../../Inputs/empty.swift -module-cache-path %t 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s
10+
// RUN: not %swift -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s
1111

1212
// MISSING-HEADER: error: bridging header '{{.*}}/fake.h' does not exist
1313
// MISSING-HEADER-NOT: error

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// RUN: cp -r %S/Inputs/mixed-framework/Mixed.framework %t
44

55
// Don't crash if a generated header is present but the swiftmodule is missing.
6-
// RUN: not %swift %clang-importer-sdk -module-cache-path %t -F %t -parse %s
6+
// RUN: not %swift %clang-importer-sdk -F %t -parse %s
77

88
// RUN: %swiftc_driver -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/x86_64.swiftmodule %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -Xfrontend -disable-objc-attr-requires-foundation-module
9-
// RUN: %swift %clang-importer-sdk -module-cache-path %t -F %t -parse %s -verify
9+
// RUN: %swift %clang-importer-sdk -F %t -parse %s -verify
1010

1111
// REQUIRES: X86
1212

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

4-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -module-cache-path %t -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
5-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -module-cache-path %t -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain
6-
// RUN: %swift %clang-importer-sdk -module-cache-path %t -I %S/../Inputs/custom-modules -I %t -parse %s -verify
4+
// RUN: %swiftc_driver -Xfrontend %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
5+
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain
6+
// RUN: %swift %clang-importer-sdk -I %S/../Inputs/custom-modules -I %t -parse %s -verify
77

88
// RUN: rm %t/mixed-target/header.h
9-
// RUN: not %swift %clang-importer-sdk -module-cache-path %t -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER
9+
// RUN: not %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER
1010

1111
// USE-SERIALIZED-HEADER: redefinition of 'Point'
1212
// USE-SERIALIZED-HEADER: previous definition is here

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// RUN: rm -rf %t && mkdir -p %t
22
// RUN: cp -R %S/Inputs/mixed-target %t
33

4-
// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -module-cache-path %t -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
5-
// RUN: %swift %clang-importer-sdk -module-cache-path %t -I %t -I %S/../Inputs/custom-modules -parse %s -verify
4+
// RUN: %swiftc_driver -Xfrontend %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
5+
// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
66

77
// RUN: rm -rf %t/mixed-target/
8-
// RUN: %swift %clang-importer-sdk -module-cache-path %t -I %t -I %S/../Inputs/custom-modules -parse %s -verify
8+
// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify
99

1010
import MixedWithHeader
1111

test/ClangModules/MixedSource/mixed-nsuinteger.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -I %S/Inputs/user-module -parse -module-cache-path %t/clang-module-cache -target x86_64-apple-darwin13 %s -verify
1+
// RUN: %swift %clang-importer-sdk -I %S/Inputs/user-module -parse -target x86_64-apple-darwin13 %s -verify
32

43
// Type checker should not report any errors in the code below.
54

@@ -43,4 +42,4 @@ func gen<T:NSFastEnumeration>(t:T) {
4342
t.countByEnumeratingWithState(p, objects: pp, count: i)
4443
}
4544

46-
gen(userTypedObj)
45+
gen(userTypedObj)

test/ClangModules/MixedSource/mixed-target-using-header.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
4-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -module-cache-path %t -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify
1+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify
52

63
func test(foo : FooProto) {
74
let _: CInt = foo.bar

test/ClangModules/MixedSource/mixed-target-using-module.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
4-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -module-cache-path %t -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify
5-
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -module-cache-path %t -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s
6-
// RUN: not %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -module-cache-path %t -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s
1+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify
2+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s
3+
// RUN: not %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s
74

85
// CHECK-AUTOLINK: !{{[0-9]+}} = metadata !{i32 {{[0-9]+}}, metadata !"Linker Options", metadata ![[LINK_LIST:[0-9]+]]}
96
// CHECK-AUTOLINK: ![[LINK_LIST]] = metadata !{

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// RUN: %swiftc_driver -emit-module -emit-objc-header -o %t/Base.swiftmodule %S/Inputs/resolve-cross-language/Base.swift -Xfrontend -disable-objc-attr-requires-foundation-module
55
// RUN: cp %S/Inputs/resolve-cross-language/Base-module.map %t/module.map
6-
// RUN: %swift %clang-importer-sdk -module-cache-path %t -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify
6+
// RUN: %swift %clang-importer-sdk -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify
77

88
import Base
99
import BaseUser

test/ClangModules/accessibility_framework.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
32

43
// The accessibility APIs are handled differently. A class might conform to both
54
// NSAccessibility (containing accessibility properties) and individual

test/ClangModules/adapter.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift -parse -verify -module-cache-path %t/clang-module-cache %clang-importer-sdk -I %S/Inputs/custom-modules %s
1+
// RUN: %swift -parse -verify %clang-importer-sdk -I %S/Inputs/custom-modules %s
32

43
// Do not import Foundation! This tests indirect visibility.
54
import Redeclaration

test/ClangModules/autolinking.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: rm -rf %t
22
// RUN: mkdir -p %t
3-
// RUN: %swift %s -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I=%S/Inputs/custom-modules -module-cache-path %t/clang-module-cache -emit-ir -o %t/without-adapter.ll
3+
// RUN: %swift %s -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll
44
// RUN: FileCheck %s < %t/without-adapter.ll
55

66
// RUN: %swift -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I=%S/Inputs/custom-modules -o %t
7-
// RUN: %swift %s -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I=%S/Inputs/custom-modules -I %t -module-cache-path %t/clang-module-cache -emit-ir -o %t/with-adapter.ll
7+
// RUN: %swift %s -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll
88
// RUN: FileCheck %s < %t/with-adapter.ll
99
// RUN: FileCheck --check-prefix=CHECK-WITH-SWIFT %s < %t/with-adapter.ll
1010

test/ClangModules/availability.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s
1+
// RUN: %swift %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s
32

43
import Dispatch
54
import Foundation

test/ClangModules/availability_app_extension.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -application-extension %s
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 -application-extension %s
32

43
import Foundation
54

test/ClangModules/blocks_parse.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s
3-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s
4-
// CHECK: blocks{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
52

63
import blocks
74
import Foundation

test/ClangModules/broken-modules.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: rm -rf %t && mkdir -p %t
2-
// RUN: not %swift -parse %s -I %S/Inputs/custom-modules/ -module-cache-path %t -show-diagnostics-after-fatal 2> %t/err.txt
2+
// RUN: not %swift -parse %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal 2> %t/err.txt
33
// RUN: FileCheck %s < %t/err.txt
44

55
import MissingHeader

test/ClangModules/cf.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift -parse -verify -import-cf-types -module-cache-path %t/clang-module-cache -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s
1+
// RUN: %swift -parse -verify -import-cf-types -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s
32

43
import CoreCooling
54

test/ClangModules/cfuncs_ir.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s
1+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s
32

43
import cfuncs
54

test/ClangModules/cfuncs_parse.swift

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// RUN: rm -rf %t
2-
// RUN: mkdir -p %t
3-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -I %S/Inputs %s
4-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s
5-
// CHECK: cfuncs{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 -I %S/Inputs %s
62

73
import cfuncs
84

test/ClangModules/clang_builtin.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Note: this test intentionally uses a private module cache.
2+
//
13
// RUN: rm -rf %t/clang-module-cache
24
// RUN: %target-build-swift -parse -Xfrontend -verify -module-cache-path %t/clang-module-cache -sdk %sdk -target %target-triple %s
35
// RUN: ls -lR %t/clang-module-cache | FileCheck %s

test/ClangModules/cstring_parse.swift

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Note: this test intentionally uses a private module cache.
2+
//
13
// RUN: rm -rf %t
24
// RUN: mkdir -p %t
35
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -I %S/Inputs %s

test/ClangModules/ctypes_ir.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -emit-ir -o - -primary-file %s | FileCheck %s
1+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -emit-ir -o - -primary-file %s | FileCheck %s
32

43
import ctypes
54

test/ClangModules/ctypes_parse.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s
3-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s
4-
// CHECK: ctypes{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
52

63
import ctypes
74
import CoreGraphics

test/ClangModules/ctypes_parse_union.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -enable-union-import -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s
3-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s
4-
// CHECK: ctypes{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -enable-union-import -parse -verify -target x86_64-apple-macosx10.9 %s
52

63
import ctypes
74

test/ClangModules/custom-include.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -I=%S/Inputs/custom-modules %s -parse -verify
1+
// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules %s -parse -verify
32

43
import ExternIntX
54

test/ClangModules/cvars_ir.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s
3-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s --check-prefix=CHECK-LS
4-
// CHECK-LS: cvars{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s
52

63
import cvars
74

test/ClangModules/cvars_parse.swift

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
// RUN: rm -rf %t/clang-module-cache
2-
// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 %s
3-
// RUN: ls -lR %t/clang-module-cache | FileCheck %s
4-
// CHECK: cvars{{.*}}.pcm
1+
// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s
52

63
import cvars
74

0 commit comments

Comments
 (0)