diff mbox series

[v2,14/22] oe-selftest: fitimage: run all tests for the FIT image recipe

Message ID 20250513213834.87830-15-adrian.freihofer@siemens.com
State New
Headers show
Series FIT image improvements | expand

Commit Message

AdrianF May 13, 2025, 9:36 p.m. UTC
From: Adrian Freihofer <adrian.freihofer@siemens.com>

Run all existing tests for the kernel-fitimage.bbclass also for the new
linux-yocto-fitimage recipe. This also ensures that both implementations
are compatible with each other.

Note: The vmlinux kernel artifacts required by the new
linux-yocto-fitimage recipe are exported by the kernel-uboot.bbclass,
which is inherited from the kernel-uimage.bbclass, which in turn is
inherited by default from the kernel.bbclass as follows:
 KERNEL_CLASSES = " kernel-uboot "
It is therefore no longer necessary to add anything to KERNEL_CLASSES
when creating a fitImage.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/lib/oeqa/selftest/cases/fitimage.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index b001339b73b..aadec58c30e 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -981,6 +981,17 @@  FIT_HASH_ALG = "sha256"
         bb_vars = self._fit_get_bb_vars()
         self._test_fitimage(bb_vars)
 
+class KernelFitImageRecipeTests(KernelFitImageTests):
+    """Test cases for the linux-yocto-fitimage recipe"""
+
+    @property
+    def kernel_recipe(self):
+        return "linux-yocto-fitimage"
+
+    def _config_add_kernel_classes(self, config):
+        config += '# Avoid naming clashes in the deploy folder with kernel-fitimage.bbclass artifacts' + os.linesep
+        config += 'KERNEL_DEPLOYSUBDIR:pn-linux-yocto-fitimage = "linux-yocto-fitimage"' + os.linesep
+        return config
 
 class FitImagePyTests(KernelFitImageBase):
     """Test cases for the fitimage.py module without calling bitbake"""