mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-25 21:57:42 +03:00
tests: Use skip_without_ostree_feature to detect libarchive, composefs
This avoids false negatives from `ostree --version | grep -q ...` exiting with failure under `set -o pipefail` because `grep -q` can exit as soon as it sees the desired string, leaving `ostree --version` to be terminated by `SIGPIPE` next time it writes to stdout. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
a84e56d603
commit
37466ec35b
@ -19,11 +19,7 @@ set -euo pipefail
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
if ! ${CMD_PREFIX} ostree --version | grep -q -e '- composefs'; then
|
||||
echo "1..0 #SKIP no composefs support compiled in"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
skip_without_ostree_feature composefs
|
||||
skip_without_user_xattrs
|
||||
|
||||
setup_test_repository "bare-user"
|
||||
|
@ -19,13 +19,9 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if ! ostree --version | grep -q -e '- libarchive'; then
|
||||
echo "1..0 #SKIP no libarchive support compiled in"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
skip_without_ostree_feature libarchive
|
||||
setup_test_repository "archive"
|
||||
|
||||
echo '1..6'
|
||||
|
@ -19,13 +19,10 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if ! ostree --version | grep -q -e '- libarchive'; then
|
||||
echo "1..0 #SKIP no libarchive support compiled in"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. $(dirname $0)/libtest.sh
|
||||
|
||||
skip_without_ostree_feature libarchive
|
||||
|
||||
echo "1..18"
|
||||
|
||||
setup_test_repository "bare"
|
||||
|
Loading…
x
Reference in New Issue
Block a user