diff options
author | Ross Burton <ross.burton@intel.com> | 2015-08-27 15:14:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-01 21:07:20 +0000 |
commit | b1d85f13e79f8a493b9849551357a1a5cf0d0fec (patch) | |
tree | f88efed78b2ed4d2269aaa6a1e89e4585ef7687a | |
parent | 6fac3caf3d70823c830178f2299ceee275a1edd1 (diff) | |
download | openembedded-core-b1d85f13e79f8a493b9849551357a1a5cf0d0fec.tar.gz openembedded-core-b1d85f13e79f8a493b9849551357a1a5cf0d0fec.tar.bz2 openembedded-core-b1d85f13e79f8a493b9849551357a1a5cf0d0fec.zip |
oeqa/qemurunner: pass nographic to runqemu if DISPLAY isn't set
Not everyone wants to run the tests with a qemu that has a graphical output, so
allow display to be None and pass nographic to runqemu in that case.
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index e1c8ea1085..def8acedcb 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -94,9 +94,9 @@ class QemuRunner: def start(self, qemuparams = None): if self.display: os.environ["DISPLAY"] = self.display - else: - logger.error("To start qemu I need a X desktop, please set DISPLAY correctly (e.g. DISPLAY=:1)") - return False + # Set this flag so that Qemu doesn't do any grabs as SDL grabs + # interact badly with screensavers. + os.environ["QEMU_DONT_GRAB"] = "1" if not os.path.exists(self.rootfs): logger.error("Invalid rootfs %s" % self.rootfs) return False @@ -118,10 +118,10 @@ class QemuRunner: logger.error("Failed to create listening socket: %s" % msg[1]) return False - # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact - # badly with screensavers. - os.environ["QEMU_DONT_GRAB"] = "1" + self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport) + if not self.display: + self.qemuparams = 'nographic ' + self.qemuparams if qemuparams: self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' |