[lit] Move pipefail test into lit tests

These removes another test that otherwise needs a shell. This does
remove test coverage for pipefail in the external shell, but the
external shell should be disabled by default pretty soon. This also adds
test coverage for the internal shell which did not exist before.

Reviewers: jh7370, ilovepi, petrhosek

Reviewed By: ilovepi, petrhosek

Pull Request: https://github.com/llvm/llvm-project/pull/157223
This commit is contained in:
Aiden Grossman
2025-09-07 10:43:59 -07:00
committed by GitHub
parent fc01a55755
commit 859dc6b0c0
3 changed files with 10 additions and 3 deletions

View File

@@ -1,2 +0,0 @@
REQUIRES: shell
RUN: ((false | true) && echo true || echo false) | grep false

View File

@@ -0,0 +1,4 @@
# Check that we fail if earlier operations in a pipe fail.
#
# RUN: false | echo test
#

View File

@@ -580,6 +580,11 @@
# CHECK: # error: command failed with exit status: 127
# CHECK: ***
# CHECK: FAIL: shtest-shell :: pipefail.txt
# CHECK: *** TEST 'shtest-shell :: pipefail.txt' FAILED ***
# CHECK: error: command failed with exit status: 1
# CHECK: ***
# CHECK: PASS: shtest-shell :: redirects.txt
# CHECK: FAIL: shtest-shell :: rm-error-0.txt
@@ -629,4 +634,4 @@
# CHECK: PASS: shtest-shell :: valid-shell.txt
# CHECK: Unresolved Tests (1)
# CHECK: Failed Tests (36)
# CHECK: Failed Tests (37)