diff options
| author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2024-11-11 13:16:03 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-12 11:31:48 +0000 |
| commit | 30cc8b17d016370ea2747e370ab115c7ea895bae (patch) | |
| tree | 2120a36cbe9533bc947987ba60b7f6bd2f1e424b | |
| parent | e743cde63c2fe6beed8eedcd5a41eb497853c7c2 (diff) | |
| download | poky-30cc8b17d016370ea2747e370ab115c7ea895bae.tar.gz | |
oeqa runtime uki.py: add tests
If Unified Kernel Image was enabled via IMAGE_CLASSES, then
target should also boot the same uki at runtime.
(From OE-Core rev: 2ae651c869a19fd24b5a915451c1f99e1d7b32f0)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/uki.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/uki.py b/meta/lib/oeqa/runtime/cases/uki.py new file mode 100644 index 0000000000..77bc5b9791 --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/uki.py | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # SPDX-License-Identifier: MIT | ||
| 2 | # | ||
| 3 | |||
| 4 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 5 | from oeqa.core.decorator.data import skipIfNotInDataVar | ||
| 6 | |||
| 7 | class UkiTest(OERuntimeTestCase): | ||
| 8 | |||
| 9 | @skipIfNotInDataVar('IMAGE_CLASSES', 'uki', 'Test case uki is for images which use uki.bbclass') | ||
| 10 | def test_uki(self): | ||
| 11 | uki_filename = self.td.get('UKI_FILENAME') | ||
| 12 | status, output = self.target.run('ls /boot/EFI/Linux/%s' % uki_filename) | ||
| 13 | self.assertEqual(status, 0, output) | ||
| 14 | |||
| 15 | status, output = self.target.run('echo $( cat /sys/firmware/efi/efivars/LoaderEntrySelected-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f ) | grep %s' % uki_filename) | ||
| 16 | self.assertEqual(status, 0, output) | ||
