[meta-oe,v2,2/4] testimage: consider QB_DEFAULT_FSTYPE

Submitted by Adrian Freihofer on June 7, 2019, 10:13 p.m. | Patch ID: 162050

Details

Message ID 20190607221356.28867-3-adrian.freihofer@siemens.com
State New
Headers show

Commit Message

Adrian Freihofer June 7, 2019, 10:13 p.m.
testimage.bbclass starts qemu with the first image type found in
the IMAGE_FSTYPES list. It's weird: this ['wic', 'tar'] works but
this ['tar'. 'wic'] does not. If QB_DEFAULT_FSTYPE is defined,
this fstype is booted.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/classes/testimage.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 9bb5a5cb0b..525c5a6173 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -210,7 +210,11 @@  def testimage_main(d):
             bb.fatal('Unsupported image type built. Add a comptible image to '
                      'IMAGE_FSTYPES. Supported types: %s' %
                      ', '.join(supported_fstypes))
-    rootfs = '%s.%s' % (image_name, fstypes[0])
+    qfstype = fstypes[0]
+    qdeffstype = d.getVar("QB_DEFAULT_FSTYPE")
+    if qdeffstype:
+        qfstype = qdeffstype
+    rootfs = '%s.%s' % (image_name, qfstype)
 
     # Get tmpdir (not really used, just for compatibility)
     tmpdir = d.getVar("TMPDIR")