From 2282b0f1581b697e115696ac559e70eedc9bcd5e Mon Sep 17 00:00:00 2001 From: Patrick Vacek Date: Thu, 3 May 2018 09:34:00 +0200 Subject: Test aktualizr-example-interface package (PRO-5336). Not much else from the example configs that is easy to test with oe-selftest. --- lib/oeqa/selftest/cases/updater.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/oeqa/selftest/cases/updater.py b/lib/oeqa/selftest/cases/updater.py index 2ef5a3b..6dcc8df 100644 --- a/lib/oeqa/selftest/cases/updater.py +++ b/lib/oeqa/selftest/cases/updater.py @@ -150,6 +150,8 @@ class AutoProvTests(OESelftestTestCase): self.meta_qemu = None self.append_config('MACHINE = "qemux86-64"') self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "') + # Test aktualizr-example-interface package. + self.append_config('IMAGE_INSTALL_append = " aktualizr-examples aktualizr-example-interface "') self.qemu, self.s = qemu_launch(machine='qemux86-64') def tearDownLocal(self): @@ -183,6 +185,12 @@ class AutoProvTests(OESelftestTestCase): self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) verifyProvisioned(self, machine) + # Test aktualizr-example-interface package. + stdout, stderr, retcode = self.qemu_command('aktualizr-info') + self.assertIn(b'hardware ID: example1', stdout, + 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode()) + self.assertIn(b'hardware ID: example2', stdout, + 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode()) class RpiTests(OESelftestTestCase): @@ -591,6 +599,7 @@ class PrimaryTests(OESelftestTestCase): self.assertEqual(retcode, 0, "Unable to run aktualizr --help") self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) + def qemu_launch(efi=False, machine=None, imagename=None): logger = logging.getLogger("selftest") logger.info('Running bitbake to build core-image-minimal') -- cgit v1.2.3-54-g00ecf