[2/2] oeqa/selftest/signing: check that we have GPG in setup

Message ID 1469121352-29774-2-git-send-email-ross.burton@intel.com
State Accepted
Commit 6eb6fde2567a2692afccb7ee0546b2c992c168aa
Headers show

Commit Message

Ross Burton July 21, 2016, 5:15 p.m.
Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/lib/oeqa/selftest/signing.py | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.8.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/lib/oeqa/selftest/signing.py b/meta/lib/oeqa/selftest/signing.py
index beafd63..4c12d6d 100644
--- a/meta/lib/oeqa/selftest/signing.py
+++ b/meta/lib/oeqa/selftest/signing.py
@@ -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