[oe-commits] [openembedded-core] 53/92: scripts/runqemu: Fix logic error causing failures with MACHINE from the environment

git at git.openembedded.org git at git.openembedded.org
Tue Jan 8 20:20:11 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit bf2ae1ca01edf02a930d70e50b8e1e71f7ec2237
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Nov 28 16:09:56 2018 +0000

    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 at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/runqemu | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 295c8b1..08f4cfe4 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -474,14 +474,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)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list