Skip to content

Commit 39ad5e4

Browse files
authored
Merge pull request #32789 from compnerd/pipe-dream
test: use `-log-path` for stderr access in ModuleInterface tests
2 parents e72629d + e3548dd commit 39ad5e4

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

test/ModuleInterface/swift_build_sdk_interfaces/compiler-crash-windows.test-sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# See rdar://59397376
55
REQUIRES: OS=windows-msvc
66

7-
RUN: env SWIFT_EXEC=%swiftc_driver_plain not --crash %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/mock-sdk/ -o %t/output -debug-crash-compiler 2>&1 | %FileCheck %s
7+
RUN: %empty-directory(%t)
8+
RUN: env SWIFT_EXEC=%swiftc_driver_plain not --crash %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/mock-sdk/ -o %t/output -debug-crash-compiler -log-path %t
9+
RUN: %FileCheck %s < %t/Flat-Flat-err.txt
810

911
CHECK: Program arguments:
1012
CHECK-SAME: -debug-crash-immediately

test/ModuleInterface/swift_build_sdk_interfaces/xfails.test-sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
RUN: %empty-directory(%t)
2-
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -o %t/output 2> %t/stderr.txt | %FileCheck %s
3-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
4-
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -v -o %t/output 2> %t/stderr.txt | %FileCheck -check-prefix CHECK-VERBOSE %s
5-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
2+
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -o %t/output -log-path %t | %FileCheck %s
3+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
4+
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -log-path %t | %FileCheck -check-prefix CHECK-VERBOSE %s
5+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
66

77
CHECK: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
88
CHECK-VERBOSE-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
@@ -13,10 +13,10 @@ HIDES-ERROR-NOT: cannot find 'garbage' in scope
1313

1414
RUN: %empty-directory(%t)
1515
RUN: echo '["Good"]' > %t/xfails-good.json
16-
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -o %t/output -xfails %t/xfails-good.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD %s
17-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
16+
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -o %t/output -xfails %t/xfails-good.json -log-path %t | %FileCheck -check-prefix=CHECK-XFAIL-GOOD %s
17+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
1818
RUN: env SWIFT_EXEC=%swiftc_driver_plain not %{python} %utils/swift_build_sdk_interfaces.py %mcp_opt -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-good.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD %s
19-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
19+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
2020

2121
CHECK-XFAIL-GOOD-DAG: # (FAIL) {{.+}}{{\\|/}}Bad.swiftinterface
2222
CHECK-XFAIL-GOOD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
@@ -25,8 +25,8 @@ RUN: %empty-directory(%t)
2525
RUN: echo '["Good", "Bad"]' > %t/xfails-good-and-bad.json
2626
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -xfails %t/xfails-good-and-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD-AND-BAD %s
2727
RUN: %FileCheck -check-prefix HIDES-ERROR -allow-empty %s < %t/stderr.txt
28-
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-good-and-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-GOOD-AND-BAD %s
29-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
28+
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-good-and-bad.json -log-path %t | %FileCheck -check-prefix=CHECK-XFAIL-GOOD-AND-BAD %s
29+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
3030

3131
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
3232
CHECK-XFAIL-GOOD-AND-BAD-DAG: # (UPASS) {{.+}}{{\\|/}}Good.swiftinterface
@@ -35,8 +35,8 @@ RUN: %empty-directory(%t)
3535
RUN: echo '["Bad"]' > %t/xfails-bad.json
3636
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -o %t/output -xfails %t/xfails-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-BAD %s
3737
RUN: %FileCheck -check-prefix HIDES-ERROR -allow-empty %s < %t/stderr.txt
38-
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-bad.json 2> %t/stderr.txt | %FileCheck -check-prefix=CHECK-XFAIL-BAD-VERBOSE %s
39-
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/stderr.txt
38+
RUN: %swift_build_sdk_interfaces -sdk %S/Inputs/xfails-sdk/ -v -o %t/output -xfails %t/xfails-bad.json -log-path %t | %FileCheck -check-prefix=CHECK-XFAIL-BAD-VERBOSE %s
39+
RUN: %FileCheck -check-prefix PRINTS-ERROR %s < %t/Bad-Bad-err.txt
4040

4141
CHECK-XFAIL-BAD: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface
4242
CHECK-XFAIL-BAD-VERBOSE-DAG: # (XFAIL) {{.+}}{{\\|/}}Bad.swiftinterface

0 commit comments

Comments
 (0)