Skip to content

Commit 8e0407b

Browse files
committed
[test] Add SWIFT_USE_OLD_DRIVER=1 to some tests
The behavior of these tests varies depending on whether the new or old driver is being used, force the old driver for now.
1 parent 0d9f667 commit 8e0407b

6 files changed

+15
-8
lines changed

test/ClangImporter/pch-bridging-header.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
// RUN: %target-typecheck-verify-swift -import-objc-header %t/sdk-bridging-header.pch
88

99
// Now test the driver-automated version is inert when disabled
10-
// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
10+
// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
11+
// RUN: env TMPDIR=%t/tmp/ SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
1112
// RUN: not ls %t/tmp/*.pch >/dev/null 2>&1
1213

1314
// Test the driver-automated version works by default
14-
// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
15+
// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
16+
// RUN: env TMPDIR=%t/tmp/ SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
1517
// RUN: ls %t/tmp/*.pch >/dev/null 2>&1
1618
// RUN: llvm-objdump --raw-clang-ast %t/tmp/*.pch | llvm-bcanalyzer -dump | %FileCheck %s
1719
// CHECK: ORIGINAL_FILE{{.*}}Inputs/sdk-bridging-header.h

test/DebugInfo/file_compilation_dir.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
// RUN: mkdir -p %t
77
// RUN: cd %t
88
// RUN: cp %s .
9-
// RUN: %target-swiftc_driver -g \
9+
// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
10+
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
1011
// RUN: -c -file-compilation-dir /path/to \
1112
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL %s
12-
// RUN: %target-swiftc_driver -g \
13+
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
1314
// RUN: -c -file-compilation-dir . \
1415
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL-CWD %s
1516

test/Misc/stats_dir_failure_count.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Check that a failed process-tree emits nonzero failure counters
22
// RUN: %empty-directory(%t)
33
// RUN: echo zzz >%t/other.swift
4-
// RUN: not %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
4+
// RUN: not env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
55
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t
66
// RUN: %FileCheck -input-file %t/stats.csv -check-prefix=FAILURE %s
77
// FAILURE: {{"Driver.NumProcessFailures" 1$}}

test/Misc/stats_dir_plausible_maxrss.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: touch %t/main.swift
3-
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
3+
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
44
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
55
// RUN: %FileCheck -input-file %t/frontend.csv %s
66

test/ModuleInterface/print_package_name_in_non_package_interface.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
// RUN: rm -rf %t/Bar.package.swiftinterface
5252

5353
/// Print -package-name in public or private interface.
54-
// RUN: %target-build-swift -emit-module %t/Bar.swift -I %t \
54+
/// Note the order of arguments differs across old/new driver, so force old
55+
/// driver for now.
56+
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-build-swift \
57+
// RUN: -emit-module %t/Bar.swift -I %t \
5558
// RUN: -module-name Bar -package-name barpkg \
5659
// RUN: -enable-library-evolution -swift-version 6 \
5760
// RUN: -Xfrontend -print-package-name-in-non-package-interface \

test/Serialization/search-paths-relative.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// RUN: %empty-directory(%t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule)
55
// RUN: %target-swift-frontend -emit-module -o %t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule/%target-swiftmodule-name %S/Inputs/alias.swift -module-name has_alias
66

7-
// RUN: cd %t/secret && %target-swiftc_driver -emit-module -o %t/has_xref.swiftmodule -I . -F ../Frameworks -parse-as-library %S/Inputs/has_xref.swift %S/../Inputs/empty.swift -Xfrontend -serialize-debugging-options -Xcc -ivfsoverlay -Xcc %S/../Inputs/unextended-module-overlay.yaml -Xcc -DDUMMY
7+
// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
8+
// RUN: cd %t/secret && env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -emit-module -o %t/has_xref.swiftmodule -I . -F ../Frameworks -parse-as-library %S/Inputs/has_xref.swift %S/../Inputs/empty.swift -Xfrontend -serialize-debugging-options -Xcc -ivfsoverlay -Xcc %S/../Inputs/unextended-module-overlay.yaml -Xcc -DDUMMY
89
// RUN: %target-swift-frontend %s -typecheck -I %t
910

1011
// Ensure that in Swift 6 mode we do not read out search paths, thus are no longer able to

0 commit comments

Comments
 (0)