[oe-commits] [openembedded-core] 14/28: targetcontrol: add image_fstype argument to commands.runqemu
git at git.openembedded.org
git at git.openembedded.org
Tue Mar 7 22:15:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit d058308ada8f817949fae0d6fe40207c669ba7f2
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Mon Mar 6 17:10:10 2017 +0200
targetcontrol: add image_fstype argument to commands.runqemu
qemu runner picks up first fsimage type from the hard-coded
list of supported types. This makes it impossible to test
particular image type unless it's not ext4(first type in
the hardcoded list of types).
Added image_fstypes argument to commands.runqemu and QemuTarget
__init__ to specify type of the image to run qemu with.
This will be used to pass wic image type to test efi wic images.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/lib/oeqa/targetcontrol.py | 4 ++--
meta/lib/oeqa/utils/commands.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index dbd2c7c..0ad3a6b 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -113,11 +113,11 @@ class QemuTarget(BaseTarget):
supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
- def __init__(self, d):
+ def __init__(self, d, image_fstype=None):
super(QemuTarget, self).__init__(d)
- self.image_fstype = self.get_image_fstype(d)
+ self.image_fstype = image_fstype or self.get_image_fstype(d)
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 73ede23..82c5908 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -218,7 +218,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec=
@contextlib.contextmanager
-def runqemu(pn, ssh=True, runqemuparams=''):
+def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None):
import bb.tinfoil
import bb.build
@@ -240,7 +240,7 @@ def runqemu(pn, ssh=True, runqemuparams=''):
logger.propagate = False
logdir = recipedata.getVar("TEST_LOG_DIR")
- qemu = oeqa.targetcontrol.QemuTarget(recipedata)
+ qemu = oeqa.targetcontrol.QemuTarget(recipedata, image_fstype)
finally:
# We need to shut down tinfoil early here in case we actually want
# to run tinfoil-using utilities with the running QEMU instance.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list