summaryrefslogtreecommitdiff
path: root/tests/test-commit-sign.sh
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-03-02 10:28:04 -0500
committerColin Walters <walters@verbum.org>2016-03-03 08:50:19 -0500
commitd25212f04ac824afff9f45e61be3d8e63be174f2 (patch)
treef9efa0baed1854462db1b4f7b1fd35b96d4edc1b /tests/test-commit-sign.sh
parent6d73a620e19dfc982fa08363aed441e0175c8d7b (diff)
downloadostree-d25212f04ac824afff9f45e61be3d8e63be174f2.tar.gz
tests: Port to glib-tap.mk, make `make check` run all of the tests
OSTree's code for testing predates the `glib-tap.mk` making its way into GLib. Let's switch to it, as it provides a number of advantages. By far the biggest advantage is that `make check` can start to run most of the tests *in addition* to having them work installed. This commit keeps the installed tests working, but `make check` turns out to be really broken because...our TAP usage has bitrotted to say the least. Fix that all up. Do some hacks so that the tests work uninstalled as well - in particular, `glib-tap.mk` and the bits encoded into `g_test_build_filename()` assume *recursive* Automake (blah). Work around that by creating a symlink when installed to loop back.
Diffstat (limited to 'tests/test-commit-sign.sh')
-rwxr-xr-xtests/test-commit-sign.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh
index 2db671ee..8d52bcaf 100755
--- a/tests/test-commit-sign.sh
+++ b/tests/test-commit-sign.sh
@@ -20,11 +20,14 @@
set -euo pipefail
if ! ostree --version | grep -q -e '\+gpgme'; then
- exit 77
+ echo "1..0 #SKIP no gpg support compiled in"
+ exit 0
fi
. $(dirname $0)/libtest.sh
+echo "1..1"
+
keyid="472CDAFA"
oldpwd=`pwd`
mkdir ostree-srv
@@ -122,10 +125,12 @@ assert_file_has_content show 'Found 1 signature'
# Delete the signature from the commit so the detached metadata is empty,
# then pull and verify the signature is also deleted on the client side.
-${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo gpg-sign --gpg-homedir=${SRCDIR}/gpghome --delete main $keyid
+${CMD_PREFIX} ostree --repo=${test_tmpdir}/ostree-srv/gnomerepo gpg-sign --gpg-homedir=${test_tmpdir}/gpghome --delete main $keyid
${CMD_PREFIX} ostree --repo=repo pull origin main
if ${CMD_PREFIX} ostree --repo=repo show main | grep -o 'Found [[:digit:]] signature'; then
assert_not_reached
fi
rm -rf repo gnomerepo-files
+
+echo "ok"