summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-28 16:09:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-08 20:14:43 +0000
commitcefe82c765af910d4145fd896418540233788cb0 (patch)
treeaac4c96d6de36dfade38fddafa7977ef77c386bb /scripts
parent68069654054ef603f7822007408a2429bc880d9f (diff)
downloadpoky-cefe82c765af910d4145fd896418540233788cb0.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) (From OE-Core rev: bf2ae1ca01edf02a930d70e50b8e1e71f7ec2237) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 295c8b1b60..08f4cfe4ca 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -474,14 +474,11 @@ class BaseConfig(object):
474 "Try 'runqemu help' on how to use it" % \ 474 "Try 'runqemu help' on how to use it" % \
475 (unknown_arg, arg)) 475 (unknown_arg, arg))
476 # Check to make sure it is a valid machine 476 # Check to make sure it is a valid machine
477 if unknown_arg: 477 if unknown_arg and self.get('MACHINE') != unknown_arg:
478 if self.get('MACHINE') == unknown_arg:
479 return
480 if self.get('DEPLOY_DIR_IMAGE'): 478 if self.get('DEPLOY_DIR_IMAGE'):
481 machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE')) 479 machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE'))
482 if unknown_arg == machine: 480 if unknown_arg == machine:
483 self.set("MACHINE", machine) 481 self.set("MACHINE", machine)
484 return
485 482
486 self.check_arg_machine(unknown_arg) 483 self.check_arg_machine(unknown_arg)
487 484