tests/gpg: fix the check of GPG support
Shell function `has_gpgme` shouldn't exit if GPG support is not detected since it stop any test with error. Added function `skip_without_gpgme` to skip the whole test if it is useless without GPG support Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> Closes: #1889 Approved by: cgwalters
This commit is contained in:
parent
8322e77a88
commit
453ce83379
|
|
@ -605,10 +605,18 @@ skip_without_experimental () {
|
||||||
}
|
}
|
||||||
|
|
||||||
has_gpgme () {
|
has_gpgme () {
|
||||||
|
local ret
|
||||||
${CMD_PREFIX} ostree --version > version.txt
|
${CMD_PREFIX} ostree --version > version.txt
|
||||||
assert_file_has_content version.txt '- gpgme'
|
grep -q -e '- gpgme' version.txt
|
||||||
|
ret=$?
|
||||||
rm -f version.txt
|
rm -f version.txt
|
||||||
true
|
return ${ret}
|
||||||
|
}
|
||||||
|
|
||||||
|
skip_without_gpgme() {
|
||||||
|
if ! has_gpgme; then
|
||||||
|
skip "no gpg support compiled in"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find an appropriate gpg program to use. We want one that has the
|
# Find an appropriate gpg program to use. We want one that has the
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue