diff --git a/debian/patches/In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch b/debian/patches/In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch index 8646a451..7b6fff29 100644 --- a/debian/patches/In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch +++ b/debian/patches/In-tests-that-use-gpg-terminate-the-gpg-agent-after-testi.patch @@ -5,7 +5,7 @@ Subject: In tests that use gpg, terminate the gpg-agent after testing Otherwise we leak those processes. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/b25ddd29ab8eb56bc1022dd38758e54dc4b2ccbe --- tests/test-commit-sign.sh | 1 + tests/test-gpg-signed-commit.sh | 2 ++ diff --git a/debian/patches/Load-g-i-bindings-from-builddir-during-build-time-testing.patch b/debian/patches/Load-g-i-bindings-from-builddir-during-build-time-testing.patch index 6e25f452..6542d01a 100644 --- a/debian/patches/Load-g-i-bindings-from-builddir-during-build-time-testing.patch +++ b/debian/patches/Load-g-i-bindings-from-builddir-during-build-time-testing.patch @@ -6,25 +6,25 @@ Previously, the build-time tests would only pass if the g-i bindings to OSTree were already installed, with a reasonably similar version. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/07aa8e1c76463e3de0ffc79d0271773ababf05b4 +[smcv: rebased on 2016.4] --- - Makefile-tests.am | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) + Makefile-tests.am | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile-tests.am b/Makefile-tests.am -index 9eb9ad8..97f0541 100644 +index 9eb9ad8..f10c23f 100644 --- a/Makefile-tests.am +++ b/Makefile-tests.am -@@ -22,8 +22,12 @@ include $(top_srcdir)/buildutil/glib-tap.mk - # We should probably consider flipping the default for DEBUG. Also, +@@ -23,7 +23,12 @@ include $(top_srcdir)/buildutil/glib-tap.mk # include the builddir in $PATH so we find our just-built ostree # binary. --TESTS_ENVIRONMENT += OT_TESTS_DEBUG=1 \ + TESTS_ENVIRONMENT += OT_TESTS_DEBUG=1 \ - PATH=$$(cd $(top_builddir) && pwd):$${PATH} -+TESTS_ENVIRONMENT += \ ++ SRCDIR=$$(cd $(top_srcdir) && pwd) \ ++ BUILDDIR=$$(cd $(top_builddir) && pwd) \ + GI_TYPELIB_PATH=$$(cd $(top_builddir) && pwd) \ + LD_LIBRARY_PATH=$$(cd $(top_builddir)/.libs && pwd) \ -+ OT_TESTS_DEBUG=1 \ + PATH=$$(cd $(top_builddir) && pwd):$${PATH} \ + $(NULL) diff --git a/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch b/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch index a7302b6b..08b683e5 100644 --- a/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch +++ b/debian/patches/Skip-tests-that-run-rofiles-fuse-if-dev-fuse-or-etc-mtab-.patch @@ -4,50 +4,73 @@ Subject: Skip tests that run rofiles-fuse if /dev/fuse or /etc/mtab unavailable Signed-off-by: Simon McVittie +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/e1ce859368b41c863fe096df84f1ff33e90d725f --- - tests/test-demo-buildsystem.sh | 10 ++++++++++ - tests/test-rofiles-fuse.sh | 10 ++++++++++ - 2 files changed, 20 insertions(+) + tests/libtest.sh | 17 +++++++++++++++++ + tests/test-demo-buildsystem.sh | 6 +----- + tests/test-rofiles-fuse.sh | 6 +----- + 3 files changed, 19 insertions(+), 10 deletions(-) +diff --git a/tests/libtest.sh b/tests/libtest.sh +index 21de2e8..3e4c4bd 100755 +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -332,3 +332,20 @@ skip_without_user_xattrs () { + exit 0 + fi + } ++ ++skip_without_fuse () { ++ if ! fusermount --version >/dev/null 2>&1; then ++ echo "1..0 # SKIP no fusermount" ++ exit 0 ++ fi ++ ++ if ! [ -w /dev/fuse ]; then ++ echo "1..0 # SKIP no write access to /dev/fuse" ++ exit 0 ++ fi ++ ++ if ! [ -e /etc/mtab ]; then ++ echo "1..0 # SKIP no /etc/mtab" ++ exit 0 ++ fi ++} diff --git a/tests/test-demo-buildsystem.sh b/tests/test-demo-buildsystem.sh -index e5b1f87..a4377bd 100755 +index bffa59c..97915f9 100755 --- a/tests/test-demo-buildsystem.sh +++ b/tests/test-demo-buildsystem.sh -@@ -24,6 +24,16 @@ if ! fusermount --version >/dev/null 2>&1; then - exit 0 - fi +@@ -19,13 +19,9 @@ -+if ! [ -w /dev/fuse ]; then -+ echo "1..0 # SKIP no write access to /dev/fuse" -+ exit 0 -+fi -+ -+if ! [ -e /etc/mtab ]; then -+ echo "1..0 # SKIP no /etc/mtab" -+ exit 0 -+fi -+ + set -euo pipefail + +-if ! fusermount --version >/dev/null 2>&1; then +- echo "1..0 # SKIP no fusermount" +- exit 0 +-fi +- . $(dirname $0)/libtest.sh - touch test-xattrs ++skip_without_fuse + skip_without_user_xattrs + + echo "1..1" diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh -index 346c8fe..145d7e8 100755 +index ba45959..d021df0 100755 --- a/tests/test-rofiles-fuse.sh +++ b/tests/test-rofiles-fuse.sh -@@ -24,6 +24,16 @@ if ! fusermount --version >/dev/null 2>&1; then - exit 0 - fi +@@ -19,13 +19,9 @@ -+if ! [ -w /dev/fuse ]; then -+ echo "1..0 # SKIP no write access to /dev/fuse" -+ exit 0 -+fi -+ -+if ! [ -e /etc/mtab ]; then -+ echo "1..0 # SKIP no /etc/mtab" -+ exit 0 -+fi -+ + set -euo pipefail + +-if ! fusermount --version >/dev/null 2>&1; then +- echo "1..0 # SKIP no fusermount" +- exit 0 +-fi +- . $(dirname $0)/libtest.sh - touch test-xattrs ++skip_without_fuse + skip_without_user_xattrs + + setup_test_repository "bare-user" diff --git a/debian/patches/Symlink-libreaddir-rand.so-into-tests-directory.patch b/debian/patches/Symlink-libreaddir-rand.so-into-tests-directory.patch index 615feaa7..ef8cae10 100644 --- a/debian/patches/Symlink-libreaddir-rand.so-into-tests-directory.patch +++ b/debian/patches/Symlink-libreaddir-rand.so-into-tests-directory.patch @@ -5,7 +5,7 @@ Subject: Symlink libreaddir-rand.so into tests directory This means it can be LD_PRELOADed during build-time testing. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/f8bef792cb9cdd8b9cd174dad5856727db3b9bad --- .gitignore | 1 + Makefile-decls.am | 3 +++ diff --git a/debian/patches/tap-test-clean-up-temporary-test-directories-as-intended.patch b/debian/patches/tap-test-clean-up-temporary-test-directories-as-intended.patch index 5ab57ad1..c7a21e36 100644 --- a/debian/patches/tap-test-clean-up-temporary-test-directories-as-intended.patch +++ b/debian/patches/tap-test-clean-up-temporary-test-directories-as-intended.patch @@ -9,7 +9,7 @@ This means the various "ostree trivial-httpd --autoexit" processes actually exit, because their web roots are cleaned up now. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/47fd5c74f1428d4cc02ff0061a4958c4b714e852 --- buildutil/tap-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/test-xattrs-use-TAP-syntax-to-skip-test.patch b/debian/patches/test-xattrs-use-TAP-syntax-to-skip-test.patch index ad14de1c..b730f0fa 100644 --- a/debian/patches/test-xattrs-use-TAP-syntax-to-skip-test.patch +++ b/debian/patches/test-xattrs-use-TAP-syntax-to-skip-test.patch @@ -3,7 +3,7 @@ Date: Mon, 28 Mar 2016 13:08:32 +0100 Subject: test-xattrs: use TAP syntax to skip test Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/c276025466af4319d603fe8b534dd3463818a168 --- tests/test-xattrs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/patches/tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch b/debian/patches/tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch index a44b93e1..e0b228b8 100644 --- a/debian/patches/tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch +++ b/debian/patches/tests-admin-test.sh-this-is-a-bash-script-not-a-POSIX-sh-.patch @@ -7,7 +7,7 @@ PR #226 that he prefers to require bash rather than trying to support every POSIX shell. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/1dd85513e540ef0b42f2fee7238fa1f710eaa4ca --- tests/admin-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/patches/various-tests-skip-if-temp-directory-lacks-xattr-support.patch b/debian/patches/various-tests-skip-if-temp-directory-lacks-xattr-support.patch index ccaf4664..d34ec12c 100644 --- a/debian/patches/various-tests-skip-if-temp-directory-lacks-xattr-support.patch +++ b/debian/patches/various-tests-skip-if-temp-directory-lacks-xattr-support.patch @@ -6,21 +6,38 @@ Some autobuilder environments place the entire build chroot on tmpfs, so even /var/tmp might not have this. Signed-off-by: Simon McVittie -Forwarded: https://github.com/ostreedev/ostree/pull/232 +Applied-upstream: 2016.5, https://github.com/ostreedev/ostree/commit/3e3755c497bd85e22b01829c5715119d46394687 --- - tests/test-basic-user.sh | 10 ++++++++-- - tests/test-delta.sh | 7 +++++++ - tests/test-demo-buildsystem.sh | 6 ++++++ - tests/test-local-pull.sh | 10 ++++++++-- - tests/test-prune.sh | 6 ++++++ - tests/test-rofiles-fuse.sh | 7 +++++++ - 6 files changed, 42 insertions(+), 4 deletions(-) + tests/libtest.sh | 8 ++++++++ + tests/test-basic-user.sh | 6 ++++-- + tests/test-delta.sh | 2 ++ + tests/test-demo-buildsystem.sh | 2 ++ + tests/test-local-pull.sh | 6 ++++-- + tests/test-prune.sh | 2 ++ + tests/test-rofiles-fuse.sh | 3 +++ + 7 files changed, 25 insertions(+), 4 deletions(-) +diff --git a/tests/libtest.sh b/tests/libtest.sh +index 06982d2..21de2e8 100755 +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -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 ++} diff --git a/tests/test-basic-user.sh b/tests/test-basic-user.sh -index f53de89..b5b976d 100755 +index f53de89..42e6a86 100755 --- a/tests/test-basic-user.sh +++ b/tests/test-basic-user.sh -@@ -19,10 +19,16 @@ +@@ -19,10 +19,12 @@ set -euo pipefail @@ -28,11 +45,7 @@ index f53de89..b5b976d 100755 - . $(dirname $0)/libtest.sh -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "1..0 # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi ++skip_without_user_xattrs + +echo "1..1" + @@ -40,45 +53,36 @@ index f53de89..b5b976d 100755 echo "ok setup" diff --git a/tests/test-delta.sh b/tests/test-delta.sh -index 12f54c7..4335779 100755 +index 12f54c7..a6fd6f8 100755 --- a/tests/test-delta.sh +++ b/tests/test-delta.sh -@@ -156,6 +156,13 @@ ${CMD_PREFIX} ostree --repo=repo2 ls ${newrev} >/dev/null - - echo 'ok pull delta' - -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "ok apply offline # SKIP bare-user repository requires xattr support" -+ echo "ok apply offline inline # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi -+ - rm repo2 -rf - mkdir repo2 && ${CMD_PREFIX} ostree --repo=repo2 init --mode=bare-user - mkdir deltadir -diff --git a/tests/test-demo-buildsystem.sh b/tests/test-demo-buildsystem.sh -index 500eac6..e5b1f87 100755 ---- a/tests/test-demo-buildsystem.sh -+++ b/tests/test-demo-buildsystem.sh -@@ -26,6 +26,12 @@ fi +@@ -21,6 +21,8 @@ set -euo pipefail . $(dirname $0)/libtest.sh -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "1..0 # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi ++skip_without_user_xattrs ++ + bindatafiles="bash true ostree" + morebindatafiles="false ls" + +diff --git a/tests/test-demo-buildsystem.sh b/tests/test-demo-buildsystem.sh +index 500eac6..bffa59c 100755 +--- a/tests/test-demo-buildsystem.sh ++++ b/tests/test-demo-buildsystem.sh +@@ -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. diff --git a/tests/test-local-pull.sh b/tests/test-local-pull.sh -index a9beb08..958e8c2 100755 +index a9beb08..50ecbcb 100755 --- a/tests/test-local-pull.sh +++ b/tests/test-local-pull.sh -@@ -19,10 +19,16 @@ +@@ -19,10 +19,12 @@ set -euo pipefail @@ -86,11 +90,7 @@ index a9beb08..958e8c2 100755 - . $(dirname $0)/libtest.sh -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "1..0 # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi ++skip_without_user_xattrs + +echo "1..1" + @@ -98,36 +98,28 @@ index a9beb08..958e8c2 100755 echo "ok setup" diff --git a/tests/test-prune.sh b/tests/test-prune.sh -index 7184ea9..c2f4eb9 100755 +index 7184ea9..e1796a3 100755 --- a/tests/test-prune.sh +++ b/tests/test-prune.sh -@@ -127,6 +127,12 @@ assert_file_has_content deltascount "^1$" +@@ -21,6 +21,8 @@ set -euo pipefail - echo "ok prune" + . $(dirname $0)/libtest.sh -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "ok prune with partial repo # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi ++skip_without_user_xattrs + - rm repo -rf - ostree --repo=repo init --mode=bare-user - ${CMD_PREFIX} ostree --repo=repo remote add --set=gpg-verify=false origin $(cat httpd-address)/ostree/gnomerepo + setup_fake_remote_repo1 "archive-z2" + + echo '1..2' diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh -index 444fbce..346c8fe 100755 +index 444fbce..ba45959 100755 --- a/tests/test-rofiles-fuse.sh +++ b/tests/test-rofiles-fuse.sh -@@ -25,6 +25,13 @@ if ! fusermount --version >/dev/null 2>&1; then +@@ -25,6 +25,9 @@ if ! fusermount --version >/dev/null 2>&1; then fi . $(dirname $0)/libtest.sh + -+touch test-xattrs -+if ! setfattr -n user.testvalue -v somevalue test-xattrs; then -+ echo "1..0 # SKIP bare-user repository requires xattr support" -+ exit 0 -+fi ++skip_without_user_xattrs + setup_test_repository "bare-user"