Skip to content

Commit 56c0516

Browse files
committed
[test] Fix three Driver tests under cross-compilation.
The driver exits out early if there's no stdlib for the target you're compiling for, and these tests didn't pass a target for one reason or another. rdar://problem/29173390
1 parent 2ac37cb commit 56c0516

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

test/Driver/continue-building-after-errors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: not %swiftc_driver %S/Inputs/error.swift %s 2>&1 | %FileCheck %s
2-
// RUN: not %swiftc_driver -continue-building-after-errors %S/Inputs/error.swift %s 2>&1 | %FileCheck -check-prefix=CHECK-CONTINUE %s
1+
// RUN: not %target-build-swift %S/Inputs/error.swift %s 2>&1 | %FileCheck %s
2+
// RUN: not %target-build-swift -continue-building-after-errors %S/Inputs/error.swift %s 2>&1 | %FileCheck -check-prefix=CHECK-CONTINUE %s
33

44
// CHECK: self.bar = self.bar
55
// CHECK-NOT: self.baz = self.baz

test/Driver/driver-time-compilation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %swiftc_driver -parse -driver-time-compilation %s 2>&1 | %FileCheck %s
2-
// RUN: %swiftc_driver -parse -driver-time-compilation %s %S/../Inputs/empty.swift 2>&1 | %FileCheck -check-prefix CHECK-MULTIPLE %s
1+
// RUN: %target-build-swift -parse -driver-time-compilation %s 2>&1 | %FileCheck %s
2+
// RUN: %target-build-swift -parse -driver-time-compilation %s %S/../Inputs/empty.swift 2>&1 | %FileCheck -check-prefix CHECK-MULTIPLE %s
33

44
// CHECK: Driver Time Compilation
55
// CHECK: Total Execution Time: {{[0-9]+}}.{{[0-9]+}} seconds ({{[0-9]+}}.{{[0-9]+}} wall clock)

test/Driver/swift-version-default.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
// RUN: %swiftc_driver_plain -parse -Xfrontend -verify %s
1+
// RUN: %swiftc_driver_plain -target %target-triple -module-cache-path %t -parse -Xfrontend -verify %s
22

33
// This test should be updated to match the expected default Swift version
44
// when swiftc is invoked directly.
5-
// It should /not/ follow the version specified when invoking lit.
5+
// It should /not/ follow the version specified when invoking lit, which means
6+
// it can't use the %swiftc_driver or %target-build-swift substitutions.
67

78
#if swift(>=3)
89
asdf // expected-error {{use of unresolved identifier}}

0 commit comments

Comments
 (0)