Thread (181 messages) 181 messages, 7 authors, 2021-01-20
STALE1986d

[PATCH 26/27] t9902: disable pipefail

From: Denton Liu <hidden>
Date: 2019-11-15 01:01:34
Subsystem: the rest · Maintainer: Linus Torvalds

In a future patch, we plan on running tests with `set -o pipefail`.
However, these tests cannot run with pipefail. Since git-completion.bash
is not a testing script, it does not follow the same return code
conventions and it's expected that commands can fail within a pipeline.

Run `set +o pipefail` to disable pipefail in this script.

Note that this is being unconditionally run because this test will be
skipped if its not running on Bash.

Signed-off-by: Denton Liu <redacted>
---
 t/t9902-completion.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index e90ac565e1..75a512669e 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -7,6 +7,12 @@ test_description='test bash completion'
 
 . ./lib-bash.sh
 
+# These tests cannot run with pipefail. Since git-completion.bash is not
+# a testing script, it does not follow the same return code conventions
+# and it's expected that commands can fail within a pipeline. Ignore
+# these failures.
+set +o pipefail
+
 complete ()
 {
 	# do nothing
-- 
2.24.0.399.gf8350c9437
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help