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:32:01 +0000 |
commit | b3641838d658c2e4f4883112030eb696dd049267 (patch) | |
tree | 3a42291d050b450ed312ece5e1656d935c23891f /meta/lib | |
parent | 46755cc4b85f7f743eab138750c69d58f1b6475e (diff) | |
download | poky-b3641838d658c2e4f4883112030eb696dd049267.tar.gz |
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.
(From OE-Core rev: b1d85f13e79f8a493b9849551357a1a5cf0d0fec)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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: | |||
94 | def start(self, qemuparams = None): | 94 | def start(self, qemuparams = None): |
95 | if self.display: | 95 | if self.display: |
96 | os.environ["DISPLAY"] = self.display | 96 | os.environ["DISPLAY"] = self.display |
97 | else: | 97 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs |
98 | logger.error("To start qemu I need a X desktop, please set DISPLAY correctly (e.g. DISPLAY=:1)") | 98 | # interact badly with screensavers. |
99 | return False | 99 | os.environ["QEMU_DONT_GRAB"] = "1" |
100 | if not os.path.exists(self.rootfs): | 100 | if not os.path.exists(self.rootfs): |
101 | logger.error("Invalid rootfs %s" % self.rootfs) | 101 | logger.error("Invalid rootfs %s" % self.rootfs) |
102 | return False | 102 | return False |
@@ -118,10 +118,10 @@ class QemuRunner: | |||
118 | logger.error("Failed to create listening socket: %s" % msg[1]) | 118 | logger.error("Failed to create listening socket: %s" % msg[1]) |
119 | return False | 119 | return False |
120 | 120 | ||
121 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact | 121 | |
122 | # badly with screensavers. | ||
123 | os.environ["QEMU_DONT_GRAB"] = "1" | ||
124 | self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport) | 122 | self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport) |
123 | if not self.display: | ||
124 | self.qemuparams = 'nographic ' + self.qemuparams | ||
125 | if qemuparams: | 125 | if qemuparams: |
126 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' | 126 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' |
127 | 127 | ||