Skip to content

Commit bbb04aa

Browse files
committed
[test] Disable bridging PCH in a few tests
The new driver builds a PCH by default, which the old driver didn't do. These tests don't expect a PCH, so avoid building it.
1 parent b797a98 commit bbb04aa

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
22
// RUN: %empty-directory(%t)
33
// RUN: mkdir -p %t/tmp
4-
// 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
4+
// RUN: %target-swiftc_driver -emit-module -disable-bridging-pch -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
55
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
66
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// REQUIRES: objc_interop
22
// RUN: %empty-directory(%t)
33
// RUN: mkdir -p %t/tmp
4-
// 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
4+
// RUN: %target-swiftc_driver -emit-module -disable-bridging-pch -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
55
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
66
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h
77

test/ClangImporter/pch-bridging-header-with-another-bridging-header.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift -emit-module -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
2+
// RUN: %target-build-swift -emit-module -disable-bridging-pch -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
33
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
44

55
// CHECK: IMPORTED_HEADER{{.*}}Inputs/pch-bridging-header-with-another-bridging-header/app.h
@@ -18,4 +18,4 @@
1818

1919
import App
2020

21-
_ = app_function(2)
21+
_ = app_function(2)

test/DebugInfo/ASTSection_ObjC.swift

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

66
// RUN: cp %S/Inputs/serialized-objc-header.h %t
7-
// 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
7+
// RUN: %target-build-swift -disable-bridging-pch -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
88
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s
99

1010
// RUN: rm %t/serialized-objc-header.h

validation-test/Serialization/bridging-header-first.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
3+
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
44
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
55

6-
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
6+
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
77
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
88

99
// REQUIRES: objc_interop

validation-test/Serialization/rdar29694978.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-build-swift %s -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
2+
// FIXME: Crashes with PCH (https://github.com/swiftlang/swift/issues/76641)
3+
// RUN: %target-build-swift %s -disable-bridging-pch -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
34
// RUN: %target-swift-ide-test -print-module -module-to-print=Library -source-filename=x -I %S/Inputs/ -I %t | %FileCheck %s
45

56
// REQUIRES: objc_interop

0 commit comments

Comments
 (0)