From: Ed Bartosh Date: Fri, 26 May 2017 11:39:39 +0000 (+0300) Subject: runqemu: output qemu-system errors X-Git-Tag: uninative-1.7~743 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=7fe5f5c29ca271ab718bbd1383e596f2ae61554c;p=openembedded-core.git runqemu: output qemu-system errors 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 Signed-off-by: Richard Purdie --- diff --git a/scripts/runqemu b/scripts/runqemu index 72c4176b72..0039b8359e 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: