]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: output qemu-system errors
authorEd Bartosh <ed.bartosh@linux.intel.com>
Fri, 26 May 2017 11:39:39 +0000 (14:39 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 May 2017 14:15:13 +0000 (15:15 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 72c4176b722a980a5214ac6fe7391b3a73c74888..0039b8359e073ce85cdb08163cd85dc25e1e1358 100755 (executable)
@@ -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: