[YOCTO #12099] Signed-off-by: Markus Lehtonen <markus.lehto...@linux.intel.com> --- meta-selftest/files/signing/key.passphrase | 1 + meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py | 3 ++- meta/lib/oeqa/selftest/cases/runtime_test.py | 12 +++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 meta-selftest/files/signing/key.passphrase
diff --git a/meta-selftest/files/signing/key.passphrase b/meta-selftest/files/signing/key.passphrase new file mode 100644 index 0000000000..5271a52680 --- /dev/null +++ b/meta-selftest/files/signing/key.passphrase @@ -0,0 +1 @@ +test123 diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py index 68e56f2c5e..8a2b3d2180 100644 --- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py +++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py @@ -36,7 +36,8 @@ class DnfSelftest(DnfTest): self.tc.target.copyTo(temp_file, "/etc/yum.repos.d/oe-remote-repo.repo") import re - output_makecache = self.dnf('makecache') + output_makecache = self.dnf('-y makecache') + self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache)) self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache)) output_repoinfo = self.dnf('repoinfo') diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index 07d05b5972..dea18651e3 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -3,6 +3,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqem from oeqa.core.decorator.oeid import OETestID import os import re +import tempfile class TestExport(OESelftestTestCase): @@ -143,7 +144,16 @@ class TestImage(OESelftestTestCase): # in at the start of the on-image test features += 'PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"\n' features += 'EXTRA_IMAGE_FEATURES += "package-management"\n' - features += 'PACKAGE_CLASSES = "package_rpm"' + features += 'PACKAGE_CLASSES = "package_rpm"\n' + + # Enable package feed signing + self.gpg_home = tempfile.TemporaryDirectory(prefix="oeqa-feed-sign-") + signing_key_dir = os.path.join(self.testlayer_path, 'files', 'signing') + runCmd('gpg --batch --homedir %s --import %s' % (self.gpg_home.name, os.path.join(signing_key_dir, 'key.secret'))) + features += 'INHERIT += "sign_package_feed"\n' + features += 'PACKAGE_FEED_GPG_NAME = "testuser"\n' + features += 'PACKAGE_FEED_GPG_PASSPHRASE_FILE = "%s"\n' % os.path.join(signing_key_dir, 'key.passphrase') + features += 'GPG_PATH = "%s"\n' % self.gpg_home.name self.write_config(features) # Build core-image-sato and testimage -- 2.12.3 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core