summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-28 16:09:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 11:38:36 +0000
commit1eaf3631a63dab882ef3aee28d97ff216d981db3 (patch)
treee650ca3308ced271f835572aca9bf67a2c2c2c42 /scripts/runqemu
parentce17f3b67960ee8be534c846e2076aaf6d87e3e2 (diff)
downloadpoky-1eaf3631a63dab882ef3aee28d97ff216d981db3.tar.gz
scripts/runqemu: Fix logic error causing failures with MACHINE from the environment
MACHINE=qemux86-64 oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 fails yet oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 with MACHINE in local.conf would work. It turns out that: runqemu slirp wic.qcow2 qemux86-64 works but: MACHINE=qemux86-64 runqemu slirp wic.qcow2 qemux86-64 does not. The reason are the misplaced return statements in runqemu, its skipping a block of logic when MACHINE is set in the environment when it shouldn't. Fix this. (From OE-Core rev: 98d113ae52cbbc88773a81a17b0933412a8e463b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index c79be9a846..3786646c5d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -475,14 +475,11 @@ class BaseConfig(object):
475 "Try 'runqemu help' on how to use it" % \ 475 "Try 'runqemu help' on how to use it" % \
476 (unknown_arg, arg)) 476 (unknown_arg, arg))
477 # Check to make sure it is a valid machine 477 # Check to make sure it is a valid machine
478 if unknown_arg: 478 if unknown_arg and self.get('MACHINE') != unknown_arg:
479 if self.get('MACHINE') == unknown_arg:
480 return
481 if self.get('DEPLOY_DIR_IMAGE'): 479 if self.get('DEPLOY_DIR_IMAGE'):
482 machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE')) 480 machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE'))
483 if unknown_arg == machine: 481 if unknown_arg == machine:
484 self.set("MACHINE", machine) 482 self.set("MACHINE", machine)
485 return
486 483
487 self.check_arg_machine(unknown_arg) 484 self.check_arg_machine(unknown_arg)
488 485