summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@siemens.com>2025-06-03 10:23:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-06-05 11:02:22 +0100
commit2b23528cde00839ef001f03e2f1a01f095f1682d (patch)
tree0b705a451a69b5c42cb683bc33aaba0f4dfde5e3
parente339b99ca1046e639d0b6da4e5f43fa255e21e50 (diff)
downloadpoky-2b23528cde00839ef001f03e2f1a01f095f1682d.tar.gz
oe-selftest: fitimage refactor classes
Make the new KernelFitImageRecipeTests class the one that contains the code, and keep the KernelFitImageTests class as the one that just adds back the same tests. This will make it easier to delete the tests later, which will hopefully become obsolete when the kernel-fitimage.bbclass class is no longer needed. (From OE-Core rev: 622c446c7c6139ed12c2fa2d9cffa108a85f4390) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/fitimage.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 7a8b8cc49f..7b6cba1d06 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -393,7 +393,7 @@ class FitImageTestCase(OESelftestTestCase):
393 self._check_fitimage(bb_vars, fitimage_path, uboot_tools_bindir) 393 self._check_fitimage(bb_vars, fitimage_path, uboot_tools_bindir)
394 394
395class KernelFitImageBase(FitImageTestCase): 395class KernelFitImageBase(FitImageTestCase):
396 """Test cases for the kernel-fitimage bbclass""" 396 """Test cases for the linux-yocto-fitimage recipe"""
397 397
398 def _fit_get_bb_vars(self, additional_vars=[]): 398 def _fit_get_bb_vars(self, additional_vars=[]):
399 """Retrieve BitBake variables specific to the test case. 399 """Retrieve BitBake variables specific to the test case.
@@ -435,15 +435,15 @@ class KernelFitImageBase(FitImageTestCase):
435 return bb_vars 435 return bb_vars
436 436
437 def _config_add_kernel_classes(self, config): 437 def _config_add_kernel_classes(self, config):
438 config += '# Use kernel-fitimage.bbclass for the creation of the fitImage' + os.linesep 438 config += '# Use kernel-fit-extra-artifacts.bbclass for the creation of the vmlinux artifact' + os.linesep
439 config += 'KERNEL_IMAGETYPES += " fitImage "' + os.linesep 439 config += 'KERNEL_CLASSES = "kernel-fit-extra-artifacts"' + os.linesep
440 config += 'KERNEL_CLASSES = " kernel-fitimage "' + os.linesep 440 config += '# Avoid naming clashes in the deploy folder with kernel-fitimage.bbclass artifacts' + os.linesep
441 config += 'KERNEL_DEPLOYSUBDIR = "linux-yocto-fitimage"' + os.linesep
441 return config 442 return config
442 443
443 @property 444 @property
444 def kernel_recipe(self): 445 def kernel_recipe(self):
445 # virtual/kernel does not work with SRC_URI:append:pn-%s 446 return "linux-yocto-fitimage"
446 return "linux-yocto"
447 447
448 def _config_add_uboot_env(self, config): 448 def _config_add_uboot_env(self, config):
449 """Generate an u-boot environment 449 """Generate an u-boot environment
@@ -738,7 +738,7 @@ class KernelFitImageBase(FitImageTestCase):
738 self.assertEqual(found_comments, num_signatures, "Expected %d signed and commented (%s) sections in the fitImage." % 738 self.assertEqual(found_comments, num_signatures, "Expected %d signed and commented (%s) sections in the fitImage." %
739 (num_signatures, a_comment)) 739 (num_signatures, a_comment))
740 740
741class KernelFitImageTests(KernelFitImageBase): 741class KernelFitImageRecipeTests(KernelFitImageBase):
742 """Test cases for the kernel-fitimage bbclass""" 742 """Test cases for the kernel-fitimage bbclass"""
743 743
744 def test_fit_image(self): 744 def test_fit_image(self):
@@ -1022,18 +1022,18 @@ FIT_HASH_ALG = "sha256"
1022 self._gen_signing_key(bb_vars) 1022 self._gen_signing_key(bb_vars)
1023 self._test_fitimage(bb_vars) 1023 self._test_fitimage(bb_vars)
1024 1024
1025class KernelFitImageRecipeTests(KernelFitImageTests): 1025class KernelFitImageTests(KernelFitImageRecipeTests):
1026 """Test cases for the linux-yocto-fitimage recipe""" 1026 """Test cases for the kernel-fitimage.bbclass"""
1027 1027
1028 @property 1028 @property
1029 def kernel_recipe(self): 1029 def kernel_recipe(self):
1030 return "linux-yocto-fitimage" 1030 # virtual/kernel does not work with SRC_URI:append:pn-%s
1031 return "linux-yocto"
1031 1032
1032 def _config_add_kernel_classes(self, config): 1033 def _config_add_kernel_classes(self, config):
1033 config += '# Use kernel-fit-extra-artifacts.bbclass for the creation of the vmlinux artifact' + os.linesep 1034 config += '# Use kernel-fitimage.bbclass for the creation of the fitImage' + os.linesep
1034 config += 'KERNEL_CLASSES = "kernel-fit-extra-artifacts"' + os.linesep 1035 config += 'KERNEL_IMAGETYPES += " fitImage "' + os.linesep
1035 config += '# Avoid naming clashes in the deploy folder with kernel-fitimage.bbclass artifacts' + os.linesep 1036 config += 'KERNEL_CLASSES = " kernel-fitimage "' + os.linesep
1036 config += 'KERNEL_DEPLOYSUBDIR = "linux-yocto-fitimage"' + os.linesep
1037 return config 1037 return config
1038 1038
1039class FitImagePyTests(KernelFitImageBase): 1039class FitImagePyTests(KernelFitImageBase):