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>
. $(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"
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'
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"