[OE-core] [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
Burton, Ross
ross.burton at intel.com
Tue Dec 5 16:10:54 UTC 2017
On 1 December 2017 at 05:13, Robert Yang <liezhi.yang at windriver.com> wrote:
> So that both QEMU_USE_KVM = "True" and "1" will work.
>
> [YOCTO #12343]
>
> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
> ---
> meta/classes/testimage.bbclass | 2 +-
> meta/lib/oeqa/targetcontrol.py | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.
> bbclass
> index 45bb2bd..7260ad4 100644
> --- a/meta/classes/testimage.bbclass
> +++ b/meta/classes/testimage.bbclass
> @@ -215,7 +215,7 @@ def testimage_main(d):
> # Get use_kvm
> qemu_use_kvm = d.getVar("QEMU_USE_KVM")
> if qemu_use_kvm and \
> - (qemu_use_kvm == 'True' and 'x86' in machine or \
> + (oe.types.boolean(qemu_use_kvm) and 'x86' in machine or \
> d.getVar('MACHINE') in qemu_use_kvm.split()):
> kvm = True
> else:
> diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.
> py
> index f63936c..3fc3870 100644
> --- a/meta/lib/oeqa/targetcontrol.py
> +++ b/meta/lib/oeqa/targetcontrol.py
> @@ -107,7 +107,7 @@ class QemuTarget(BaseTarget):
> dump_dir = d.getVar("TESTIMAGE_DUMP_DIR")
> qemu_use_kvm = d.getVar("QEMU_USE_KVM")
> if qemu_use_kvm and \
> - (qemu_use_kvm == "True" and "x86" in d.getVar("MACHINE") or \
> + (oe.types.boolean(qemu_use_kvm) and "x86" in
> d.getVar("MACHINE") or \
> d.getVar("MACHINE") in qemu_use_kvm.split()):
> use_kvm = True
> else:
>
https://autobuilder.yocto.io/builders/nightly-oe-selftest/builds/665/steps/Running%20oe-selftest/logs/stdio
File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/targetcontrol.py",
line 110, in __init__
(oe.types.boolean(qemu_use_kvm) and "x86" in d.getVar("MACHINE") or \
UnboundLocalError: local variable 'oe' referenced before assignment
Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171205/b7cabeeb/attachment-0002.html>
More information about the Openembedded-core
mailing list