[llvm] 859dc6b - [lit] Move pipefail test into lit tests
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 7 10:44:02 PDT 2025
Author: Aiden Grossman
Date: 2025-09-07T10:43:59-07:00
New Revision: 859dc6b0c0cc209a427f3cc83d978ada2483cbee
URL: https://github.com/llvm/llvm-project/commit/859dc6b0c0cc209a427f3cc83d978ada2483cbee
DIFF: https://github.com/llvm/llvm-project/commit/859dc6b0c0cc209a427f3cc83d978ada2483cbee.diff
LOG: [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
Added:
llvm/utils/lit/tests/Inputs/shtest-shell/pipefail.txt
Modified:
llvm/utils/lit/tests/shtest-shell.py
Removed:
llvm/test/Other/pipefail.txt
################################################################################
diff --git a/llvm/test/Other/pipefail.txt b/llvm/test/Other/pipefail.txt
deleted file mode 100644
index 241080aab661c..0000000000000
--- a/llvm/test/Other/pipefail.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-REQUIRES: shell
-RUN: ((false | true) && echo true || echo false) | grep false
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/pipefail.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/pipefail.txt
new file mode 100644
index 0000000000000..b0d9dee4a2ced
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/pipefail.txt
@@ -0,0 +1,4 @@
+# Check that we fail if earlier operations in a pipe fail.
+#
+# RUN: false | echo test
+#
\ No newline at end of file
diff --git a/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py
index b8bdc6e532e3d..498f6bb0adc11 100644
--- a/llvm/utils/lit/tests/shtest-shell.py
+++ b/llvm/utils/lit/tests/shtest-shell.py
@@ -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)
More information about the llvm-commits
mailing list