From 79b28210e3af5422002ef4ad79e77620295a4d38 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Oct 2009 12:28:51 -0700 Subject: tests: enable pipefail shell option if possible pipefail is extremely useful for detecting bad exits _anywhere_ in pipelines, not just the last command. Combined with "set -e", pipefail leads to very unforgiving scripts that bail out at the first sign of error, exactly what we want in tests. --- t/test-lib.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 't/test-lib.sh') diff --git a/t/test-lib.sh b/t/test-lib.sh index e5b0bc8..d278329 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1,5 +1,7 @@ #!/bin/sh # Copyright (c) 2009 Rainbows! developers + +set -o pipefail >/dev/null 2>&1 || : # non-POSIX, but useful in ksh/bash set -e set -u T=$(basename $0) -- cgit v1.2.3-24-ge0c7