diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-28 16:09:56 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-28 16:22:10 +0000 |
commit | 24351a65448a01eb613e45fb2db97a059d6d1653 (patch) | |
tree | f9b7851fed1b263b7dd03f6b58bbf60474cb408b | |
parent | 98de50fcf2f5660043a8f8079516404b190860c7 (diff) | |
download | openembedded-core-contrib-24351a65448a01eb613e45fb2db97a059d6d1653.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu | 5 |
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): "Try 'runqemu help' on how to use it" % \ (unknown_arg, arg)) # Check to make sure it is a valid machine - if unknown_arg: - if self.get('MACHINE') == unknown_arg: - return + if unknown_arg and self.get('MACHINE') != unknown_arg: if self.get('DEPLOY_DIR_IMAGE'): machine = os.path.basename(self.get('DEPLOY_DIR_IMAGE')) if unknown_arg == machine: self.set("MACHINE", machine) - return self.check_arg_machine(unknown_arg) |