Bring back skip_without_user_xattrs helper function

We'll need this to be able to skip system-mode tests without xattrs.
This partially reverts commit a53a752a35.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2017-08-31 13:56:52 +01:00
committed by Alexander Larsson
parent 6e46dc8076
commit e65bcc9fcc

View File

@@ -309,6 +309,14 @@ run_sh () {
${CMD_PREFIX} flatpak run --command=bash ${ARGS-} org.test.Hello -c "$*"
}
skip_without_user_xattrs () {
touch ${TEST_DATA_DIR}/test-xattrs
if ! setfattr -n user.testvalue -v somevalue ${TEST_DATA_DIR}/test-xattrs; then
echo "1..0 # SKIP this test requires xattr support"
exit 0
fi
}
skip_without_bwrap () {
if [ -z "${FLATPAK_BWRAP:-}" ]; then
# running installed-tests: assume we know what we're doing