libtest: add has_gpgme() helper function
Closes: #469 Approved by: cgwalters
This commit is contained in:
parent
157d878ce1
commit
c4c030cc79
|
|
@ -420,6 +420,10 @@ skip_without_fuse () {
|
||||||
[ -e /etc/mtab ] || skip "no /etc/mtab"
|
[ -e /etc/mtab ] || skip "no /etc/mtab"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_gpgme () {
|
||||||
|
${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'
|
||||||
|
}
|
||||||
|
|
||||||
libtest_cleanup_gpg () {
|
libtest_cleanup_gpg () {
|
||||||
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true
|
gpg-connect-agent --homedir ${test_tmpdir}/gpghome killagent /bye || true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,13 +19,13 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if ! ostree --version | grep -q -e '\+gpgme'; then
|
. $(dirname $0)/libtest.sh
|
||||||
|
|
||||||
|
if ! has_gpgme; then
|
||||||
echo "1..0 #SKIP no gpg support compiled in"
|
echo "1..0 #SKIP no gpg support compiled in"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $(dirname $0)/libtest.sh
|
|
||||||
|
|
||||||
echo "1..1"
|
echo "1..1"
|
||||||
|
|
||||||
keyid="472CDAFA"
|
keyid="472CDAFA"
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,13 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if ! ostree --version | grep -q -e '\+gpgme'; then
|
. $(dirname $0)/libtest.sh
|
||||||
|
|
||||||
|
if ! has_gpgme; then
|
||||||
echo "1..0 #SKIP no gpgme support compiled in"
|
echo "1..0 #SKIP no gpgme support compiled in"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $(dirname $0)/libtest.sh
|
|
||||||
|
|
||||||
echo "1..1"
|
echo "1..1"
|
||||||
|
|
||||||
setup_test_repository "archive-z2"
|
setup_test_repository "archive-z2"
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ find repo/objects -name '*.filez' | while read name; do
|
||||||
done
|
done
|
||||||
echo "ok pull mirror summary"
|
echo "ok pull mirror summary"
|
||||||
|
|
||||||
if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
|
if ! has_gpgme; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ assert_file_has_content yet-another-copy/yet-another-hello-world "hello world ye
|
||||||
${CMD_PREFIX} ostree --repo=repo fsck
|
${CMD_PREFIX} ostree --repo=repo fsck
|
||||||
echo "ok pull mirror summary"
|
echo "ok pull mirror summary"
|
||||||
|
|
||||||
if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then
|
if ! has_gpgme; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue