chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2f3ee9b
)
Test suite: set -o pipefail, in lib
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 31 May 2015 16:37:33 +0000
(17:37 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 7 Jun 2015 12:55:11 +0000
(13:55 +0100)
tests/lib
patch
|
blob
|
history
diff --git
a/tests/lib
b/tests/lib
index a0a84dda142143b49901a7549e6638a1331c0d62..cf8b72569dfdabc2368c0f49f4762cc4dede8128 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-2,6
+2,7
@@
exec 2>&1
set -x
exec 2>&1
set -x
+set -o pipefail
. tests/lib-core
. tests/lib-core
@@
-43,8
+44,11
@@
END
t-expect-fail () {
local mpat="$1"; shift
t-expect-fail () {
local mpat="$1"; shift
+ set +o pipefail
LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
- test ${PIPESTATUS[0]} != 0
+ local gotstatus=${PIPESTATUS[0]}
+ set -o pipefail
+ test $gotstatus != 0
egrep "$mpat" $tmp/t.output ||false
}
egrep "$mpat" $tmp/t.output ||false
}