various tests: skip if temp directory lacks xattr support

Some autobuilder environments place the entire build chroot on tmpfs, so
even /var/tmp might not have this.

Signed-off-by: Simon McVittie <smcv@debian.org>

Closes: #232
Approved by: cgwalters
This commit is contained in:
Simon McVittie 2016-03-31 11:06:05 +01:00 committed by Colin Walters (automation)
parent c276025466
commit 3e3755c497
7 changed files with 25 additions and 4 deletions

View File

@ -324,3 +324,11 @@ os_repository_new_commit ()
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --add-metadata-string "version=${version}" -b testos/buildmaster/x86_64-runtime -s "Build"
cd ${test_tmpdir}
}
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
}

View File

@ -19,10 +19,12 @@
set -euo pipefail
echo "1..1"
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
echo "1..1"
setup_test_repository "bare-user"
echo "ok setup"

View File

@ -21,6 +21,8 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
bindatafiles="bash true ostree"
morebindatafiles="false ls"

View File

@ -26,6 +26,8 @@ fi
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
echo "1..1"
# Run "triggers" like ldconfig, gtk-update-icon-cache, etc.

View File

@ -19,10 +19,12 @@
set -euo pipefail
echo "1..1"
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
echo "1..1"
setup_test_repository "archive-z2"
echo "ok setup"

View File

@ -21,6 +21,8 @@ set -euo pipefail
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
setup_fake_remote_repo1 "archive-z2"
echo '1..2'

View File

@ -25,6 +25,9 @@ if ! fusermount --version >/dev/null 2>&1; then
fi
. $(dirname $0)/libtest.sh
skip_without_user_xattrs
setup_test_repository "bare-user"
echo "1..5"