diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-05-03 09:34:00 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-05-04 14:47:42 +0200 |
commit | f4e53220276ff9cf3caa7c997e32f6f5a91e3128 (patch) | |
tree | 11979071bfd24284c966339164f46c4f116f612a /lib/oeqa/selftest | |
parent | f01b2b06c6fb76cd5d83f5e23643a399d7f41606 (diff) | |
download | meta-updater-f4e53220276ff9cf3caa7c997e32f6f5a91e3128.tar.gz |
Test aktualizr-example-interface package (PRO-5336).
Not much else from the example configs that is easy to test with
oe-selftest.
Diffstat (limited to 'lib/oeqa/selftest')
-rw-r--r-- | lib/oeqa/selftest/cases/updater.py | 9 |
1 files changed, 9 insertions, 0 deletions
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): | |||
150 | self.meta_qemu = None | 150 | self.meta_qemu = None |
151 | self.append_config('MACHINE = "qemux86-64"') | 151 | self.append_config('MACHINE = "qemux86-64"') |
152 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "') | 152 | self.append_config('SOTA_CLIENT_PROV = " aktualizr-auto-prov "') |
153 | # Test aktualizr-example-interface package. | ||
154 | self.append_config('IMAGE_INSTALL_append = " aktualizr-examples aktualizr-example-interface "') | ||
153 | self.qemu, self.s = qemu_launch(machine='qemux86-64') | 155 | self.qemu, self.s = qemu_launch(machine='qemux86-64') |
154 | 156 | ||
155 | def tearDownLocal(self): | 157 | def tearDownLocal(self): |
@@ -183,6 +185,12 @@ class AutoProvTests(OESelftestTestCase): | |||
183 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) | 185 | self.assertTrue(ran_ok, 'aktualizr-info failed: ' + stderr.decode() + stdout.decode()) |
184 | 186 | ||
185 | verifyProvisioned(self, machine) | 187 | verifyProvisioned(self, machine) |
188 | # Test aktualizr-example-interface package. | ||
189 | stdout, stderr, retcode = self.qemu_command('aktualizr-info') | ||
190 | self.assertIn(b'hardware ID: example1', stdout, | ||
191 | 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode()) | ||
192 | self.assertIn(b'hardware ID: example2', stdout, | ||
193 | 'Legacy secondary initialization failed: ' + stderr.decode() + stdout.decode()) | ||
186 | 194 | ||
187 | 195 | ||
188 | class RpiTests(OESelftestTestCase): | 196 | class RpiTests(OESelftestTestCase): |
@@ -591,6 +599,7 @@ class PrimaryTests(OESelftestTestCase): | |||
591 | self.assertEqual(retcode, 0, "Unable to run aktualizr --help") | 599 | self.assertEqual(retcode, 0, "Unable to run aktualizr --help") |
592 | self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) | 600 | self.assertEqual(stderr, b'', 'Error: ' + stderr.decode()) |
593 | 601 | ||
602 | |||
594 | def qemu_launch(efi=False, machine=None, imagename=None): | 603 | def qemu_launch(efi=False, machine=None, imagename=None): |
595 | logger = logging.getLogger("selftest") | 604 | logger = logging.getLogger("selftest") |
596 | logger.info('Running bitbake to build core-image-minimal') | 605 | logger.info('Running bitbake to build core-image-minimal') |