Skip to content

Commit 7f4f573

Browse files
committed
[Test] Upgrade the all backtrace tests to use not.py and %target-run.
rdar://problem/50863395
1 parent c93c8e4 commit 7f4f573

7 files changed

+22
-6
lines changed
File renamed without changes.

test/PlaygroundTransform/implicit_return_never.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -disable-playground-transform -o %t/main %t/main.swift
44
// RUN: %target-codesign %t/main
5-
// RUN: %{python} %S/Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
5+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
66
// REQUIRES: executable_test
77

88
// NOTE: not.py is used above instead of "not --crash" because simctl's exit

test/PlaygroundTransform/placeholder.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -disable-playground-transform -o %t/main %t/main.swift
44
// RUN: %target-codesign %t/main
55
// RUN: %target-run %t/main | %FileCheck %s
6-
// RUN: %{python} %S/Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
6+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/main --crash" 2>&1 | %FileCheck -check-prefix=CRASH-CHECK %s
77
// REQUIRES: executable_test
88

99
// NOTE: not.py is used above instead of "not --crash" because simctl's exit

test/Runtime/backtrace.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3-
// RUN: not --crash %target-run %t/a.out 2>&1 | %{python} %utils/backtrace-check
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/a.out" 2>&1 | %{python} %utils/backtrace-check
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// This is not supported on watchos, ios, or tvos
610
// UNSUPPORTED: OS=watchos

test/Runtime/crash_without_backtrace.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/out
3-
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// UNSUPPORTED: OS=watchos
610
// UNSUPPORTED: OS=ios

test/Runtime/crash_without_backtrace_optimized.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift -O %s -o %t/out
3-
// RUN: not --crash %t/out 2>&1 | %FileCheck %s
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/out" 2>&1 | %FileCheck %s
4+
5+
// NOTE: not.py is used above instead of "not --crash" because %target-run
6+
// doesn't pass through the crash, and `not` may not be available when running
7+
// on a remote host.
48

59
// UNSUPPORTED: OS=watchos
610
// UNSUPPORTED: OS=ios

test/Runtime/linux-fatal-backtrace.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-build-swift %s -o %t/a.out
3-
// RUN: not --crash %t/a.out 2>&1 | PYTHONPATH=%lldb-python-path %{python} %utils/symbolicate-linux-fatal %t/a.out - | %{python} %utils/backtrace-check -u
3+
// RUN: %{python} %S/../Inputs/not.py "%target-run %t/a.out" 2>&1 | PYTHONPATH=%lldb-python-path %{python} %utils/symbolicate-linux-fatal %t/a.out - | %{python} %utils/backtrace-check -u
44
// REQUIRES: executable_test
55
// REQUIRES: OS=linux-gnu
66
// REQUIRES: lldb
77

8+
// NOTE: not.py is used above instead of "not --crash" because %target-run
9+
// doesn't pass through the crash, and `not` may not be available when running
10+
// on a remote host.
11+
812
// Backtraces are not emitted when optimizations are enabled. This test can not
913
// run when optimizations are enabled.
1014
// REQUIRES: swift_test_mode_optimize_none

0 commit comments

Comments
 (0)