[Test] Use --allow-empty in crash_without_backtrace[_optimized].swift.

This commit is contained in:
Mike Ash
2019-05-23 13:28:26 -04:00
parent 84a68e11e0
commit 20b24c54b5
2 changed files with 2 additions and 17 deletions

View File

@@ -1,13 +1,11 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -o %t/out
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck --allow-empty %s
// NOTE: not.py is used above instead of "not --crash" because %target-run
// doesn't pass through the crash, and `not` may not be available when running
// on a remote host.
// REQUIRES: rdar51076215
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=ios
// UNSUPPORTED: OS=tvos

View File

@@ -1,6 +1,6 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -O %s -o %t/out
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck --allow-empty %s
// NOTE: not.py is used above instead of "not --crash" because %target-run
// doesn't pass through the crash, and `not` may not be available when running
@@ -23,21 +23,8 @@
import Swift
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Darwin
#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
import Glibc
#elseif os(Windows)
import MSVCRT
#else
#error("Unsupported platform")
#endif
func foo() -> Int {
return UnsafePointer<Int>(bitPattern: 0)!.pointee
}
// Give FileCheck something to look at to keep it happy. It fails on
// empty output even if the only directive is a CHECK-NOT.
fputs("Running test.\n", stderr)
foo()