Skip to content

Commit ef069a3

Browse files
authored
Merge pull request #25017 from mikeash/fix-crash-without-backtrace-optimized2
[Test] Use --allow-empty in crash_without_backtrace_optimized.swift.
2 parents 44f0e93 + 20b24c5 commit ef069a3

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

test/Runtime/crash_without_backtrace.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/out
3-
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck --allow-empty %s
44

55
// NOTE: not.py is used above instead of "not --crash" because %target-run
66
// doesn't pass through the crash, and `not` may not be available when running
77
// on a remote host.
88

9-
// REQUIRES: rdar51076215
10-
119
// UNSUPPORTED: OS=watchos
1210
// UNSUPPORTED: OS=ios
1311
// UNSUPPORTED: OS=tvos

test/Runtime/crash_without_backtrace_optimized.swift

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/out
3-
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck --allow-empty %s
44

55
// NOTE: not.py is used above instead of "not --crash" because %target-run
66
// doesn't pass through the crash, and `not` may not be available when running
@@ -23,21 +23,8 @@
2323

2424
import Swift
2525

26-
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
27-
import Darwin
28-
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
29-
import Glibc
30-
#elseif os(Windows)
31-
import MSVCRT
32-
#else
33-
#error("Unsupported platform")
34-
#endif
35-
3626
func foo() -> Int {
3727
return UnsafePointer<Int>(bitPattern: 0)!.pointee
3828
}
3929

40-
// Give FileCheck something to look at to keep it happy. It fails on
41-
// empty output even if the only directive is a CHECK-NOT.
42-
fputs("Running test.\n", stderr)
4330
foo()

0 commit comments

Comments
 (0)