Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] runqemu: output qemu-system errors
@ 2017-05-26 11:39 Ed Bartosh
  0 siblings, 0 replies; only message in thread
From: Ed Bartosh @ 2017-05-26 11:39 UTC (permalink / raw)
  To: openembedded-core

Included error output from qemu-system into the runqemu error message.
Made error output more visible by printing new line before it.

[YOCTO #11542]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 scripts/runqemu | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 72c4176..0039b83 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1137,9 +1137,10 @@ class BaseConfig(object):
         else:
             kernel_opts = ""
         cmd = "%s %s" % (self.qemu_opt, kernel_opts)
-        logger.info('Running %s' % cmd)
-        if subprocess.call(cmd, shell=True) != 0:
-            raise Exception('Failed to run %s' % cmd)
+        logger.info('Running %s\n' % cmd)
+        process = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE)
+        if process.wait():
+            logger.error("Failed to run qemu: %s", process.stderr.read().decode())
 
     def cleanup(self):
         if self.cleantap:
-- 
2.1.4



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-26 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-26 11:39 [PATCH] runqemu: output qemu-system errors Ed Bartosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox