]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU
authorAníbal Limón <anibal.limon@linaro.org>
Wed, 2 Jan 2019 16:08:13 +0000 (10:08 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Feb 2019 22:13:05 +0000 (22:13 +0000)
When use simpleremote target the flash/boot process is executed
manually, the IMAGE_FSTYPES validation is only needed when execute
testimage against qemu.

The supported_fstypes comes from oeqa.core.target.qemu module.

(From OE-Core rev: e7dc5963adbacc091fe8943119262166977623ad)

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/classes/testimage.bbclass

index e01ceedf61ed5971b960e202e97a8d85ee8e2392..d77f8e68628fdca2a0a680b87d2a015d2cb09090 100644 (file)
@@ -198,12 +198,13 @@ def testimage_main(d):
     machine = d.getVar("MACHINE")
 
     # Get rootfs
-    fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ')
-                  if fs in supported_fstypes]
-    if not fstypes:
-        bb.fatal('Unsupported image type built. Add a comptible image to '
-                 'IMAGE_FSTYPES. Supported types: %s' %
-                 ', '.join(supported_fstypes))
+    fstypes = d.getVar('IMAGE_FSTYPES').split()
+    if d.getVar("TEST_TARGET") == "qemu":
+        fstypes = [fs for fs in fstypes if fs in supported_fstypes]
+        if not fstypes:
+            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])
 
     # Get tmpdir (not really used, just for compatibility)