]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest/signing: check that we have GPG in setup
authorRoss Burton <ross.burton@intel.com>
Thu, 21 Jul 2016 17:15:47 +0000 (18:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jul 2016 22:47:02 +0000 (23:47 +0100)
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/signing.py

index beafd6379408eab3cf6f2b85624bb29b47277ca3..4c12d6d9403b5845696854ab5178ffd30b73b292 100644 (file)
@@ -17,6 +17,10 @@ class Signing(oeSelfTest):
 
     @classmethod
     def setUpClass(cls):
+        # Check that we can find the gpg binary and fail early if we can't
+        if not shutil.which("gpg"):
+            raise AssertionError("This test needs GnuPG")
+
         cls.gpg_home_dir = tempfile.TemporaryDirectory(prefix="oeqa-signing-")
         cls.gpg_dir = cls.gpg_home_dir.name