mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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.
This commit is contained in:
@@ -7,11 +7,13 @@
|
||||
// RUN: %target-typecheck-verify-swift -import-objc-header %t/sdk-bridging-header.pch
|
||||
|
||||
// Now test the driver-automated version is inert when disabled
|
||||
// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -disable-bridging-pch -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
|
||||
// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
|
||||
// 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
|
||||
// RUN: not ls %t/tmp/*.pch >/dev/null 2>&1
|
||||
|
||||
// Test the driver-automated version works by default
|
||||
// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -typecheck -save-temps %s -import-objc-header %S/Inputs/sdk-bridging-header.h
|
||||
// Output path of the PCH differs in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
|
||||
// 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
|
||||
// RUN: ls %t/tmp/*.pch >/dev/null 2>&1
|
||||
// RUN: llvm-objdump --raw-clang-ast %t/tmp/*.pch | llvm-bcanalyzer -dump | %FileCheck %s
|
||||
// CHECK: ORIGINAL_FILE{{.*}}Inputs/sdk-bridging-header.h
|
||||
|
||||
@@ -6,10 +6,11 @@
|
||||
// RUN: mkdir -p %t
|
||||
// RUN: cd %t
|
||||
// RUN: cp %s .
|
||||
// RUN: %target-swiftc_driver -g \
|
||||
// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
|
||||
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
|
||||
// RUN: -c -file-compilation-dir /path/to \
|
||||
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL %s
|
||||
// RUN: %target-swiftc_driver -g \
|
||||
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -g \
|
||||
// RUN: -c -file-compilation-dir . \
|
||||
// RUN: file_compilation_dir.swift -o - -emit-ir | %FileCheck --check-prefix=CHECK-REL-CWD %s
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Check that a failed process-tree emits nonzero failure counters
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: echo zzz >%t/other.swift
|
||||
// RUN: not %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
|
||||
// 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
|
||||
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/stats.csv %t
|
||||
// RUN: %FileCheck -input-file %t/stats.csv -check-prefix=FAILURE %s
|
||||
// FAILURE: {{"Driver.NumProcessFailures" 1$}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: touch %t/main.swift
|
||||
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
|
||||
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
|
||||
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
|
||||
// RUN: %FileCheck -input-file %t/frontend.csv %s
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
// RUN: rm -rf %t/Bar.package.swiftinterface
|
||||
|
||||
/// Print -package-name in public or private interface.
|
||||
// RUN: %target-build-swift -emit-module %t/Bar.swift -I %t \
|
||||
/// Note the order of arguments differs across old/new driver, so force old
|
||||
/// driver for now.
|
||||
// RUN: env SWIFT_USE_OLD_DRIVER=1 %target-build-swift \
|
||||
// RUN: -emit-module %t/Bar.swift -I %t \
|
||||
// RUN: -module-name Bar -package-name barpkg \
|
||||
// RUN: -enable-library-evolution -swift-version 6 \
|
||||
// RUN: -Xfrontend -print-package-name-in-non-package-interface \
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
// RUN: %empty-directory(%t/Frameworks/has_alias.framework/Modules/has_alias.swiftmodule)
|
||||
// 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
|
||||
|
||||
// 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
|
||||
// Output paths differ in the new driver, so force SWIFT_USE_OLD_DRIVER for now.
|
||||
// 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
|
||||
// RUN: %target-swift-frontend %s -typecheck -I %t
|
||||
|
||||
// Ensure that in Swift 6 mode we do not read out search paths, thus are no longer able to
|
||||
|
||||
Reference in New Issue
Block a user