Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2019-02-28 04:13:13 +0300
committerBryan Drewery <bryan@shatow.net>2019-02-28 04:15:17 +0300
commitd883c4a451089b0fecab1efc37b8e61905943baf (patch)
tree29c07b2bbc4d7e5f794e7811a48218a7de06ddcb /test
parente283e68741c0c72f0868f03f6b7251b34be05270 (diff)
Only enable pipefail if the shell supports it.
In non-interactive 'set -o pipefail' will immediately exit if the shell doesn't support pipefail. The method used here avoids a fork.
Diffstat (limited to 'test')
-rw-r--r--test/prefix_output.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/prefix_output.sh b/test/prefix_output.sh
index 42fb0066..221e25c7 100644
--- a/test/prefix_output.sh
+++ b/test/prefix_output.sh
@@ -33,6 +33,7 @@ until [ "${USE_TIMESTAMP}" -eq 2 ]; do
# Basic output test with prefix_stderr_quick
(
+ have_pipefail || echo "SKIP: Shell does not support pipefail" >&2
prefix_stderr_quick "STDERR" test_output 0 \
> "${OUTPUT}" 2> "${OUTPUT}.stderr"
assert 0 $? "ts=${USE_TIMESTAMP} prefix_stderr_quick test_output 0 wrong exit status"
@@ -140,6 +141,7 @@ until [ "${USE_TIMESTAMP}" -eq 2 ]; do
# Pipefail test with prefix_stderr_quick
(
+ have_pipefail || echo "SKIP: Shell does not support pipefail" >&2
prefix_stderr_quick "STDERR" test_output 5 \
> "${OUTPUT}" 2> "${OUTPUT}.stderr"
assert 5 $? "ts=${USE_TIMESTAMP} prefix_stderr_quick test_output 5 wrong exit status"