[1/2] testsuite: ensure WicTest actually builds a wic image

Message ID 20260911155659.2440003-2-felix.moessbauer@siemens.com
State New
Headers show
Series Modernize set of targets we built in the testsuite | expand

Commit Message

Felix Moessbauer Sept. 11, 2026, 3:56 p.m. UTC
We currently assume that the target we build is a wic image.
This breaks when switching the target. We improve this by explicitly
requesting a wic image when executing this test.

Along that, we fix the misleading error messages: Report what is wrong
instead of what would be right.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 testsuite/cibase.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Patch

diff --git a/testsuite/cibase.py b/testsuite/cibase.py
index c5bc06c3..2cf8448b 100755
--- a/testsuite/cibase.py
+++ b/testsuite/cibase.py
@@ -116,15 +116,21 @@  class CIBaseTest(CIBuilder):
             yaml.dump(cfg, f)
 
     def perform_wic_partition_test(self, targets, wic_deploy_parts, **kwargs):
-        self.configure(targets=targets, wic_deploy_parts=wic_deploy_parts, **kwargs)
+        lines = kwargs.get('lines', [])
+        lines += [
+            'IMAGE_FSTYPES = "wic"',
+            'IMAGER_INSTALL:wic = "${GRUB_BOOTLOADER_INSTALL}"',
+        ]
+        self.configure(targets=targets, wic_deploy_parts=wic_deploy_parts,
+                       lines=lines, **kwargs)
         self.bitbake(targets, **kwargs)
 
         wic_path = f"{self.build_dir}/tmp/deploy/images/*/*.wic.p1"
         partition_files = set(glob.glob(wic_path))
         if wic_deploy_parts and len(partition_files) == 0:
-            self.fail("Found raw wic partitions in DEPLOY_DIR")
-        if not wic_deploy_parts and len(partition_files) != 0:
             self.fail("Did not find raw wic partitions in DEPLOY_DIR")
+        if not wic_deploy_parts and len(partition_files) != 0:
+            self.fail("Found raw wic partitions in DEPLOY_DIR")
 
     def perform_repro_test(self, targets, signed=False, **kwargs):
         keys_dir = os.path.dirname(__file__) + '/keys/base-apt'