Test aktualizr-example-interface package
Not much else from the example configs that is easy to test with
oe-selftest.
@@ -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')
