Skip tests that make a repository if /var/tmp lacks user xattrs

Signed-off-by: Simon McVittie <smcv@debian.org>
tingping/wmclass
Simon McVittie 2016-05-23 20:38:51 +01:00
parent d6593d65e6
commit a461eb50fa
3 changed files with 10 additions and 0 deletions

View File

@ -196,6 +196,14 @@ run_sh () {
${CMD_PREFIX} flatpak run --command=bash ${ARGS-} org.test.Hello -c "$*"
}
skip_without_user_xattrs () {
touch test-xattrs
if ! setfattr -n user.testvalue -v somevalue 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

View File

@ -22,6 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
skip_without_bwrap
skip_without_user_xattrs
echo "1..3"

View File

@ -22,6 +22,7 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
skip_without_bwrap
skip_without_user_xattrs
echo "1..7"