* [PATCH 0/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
@ 2017-12-01 5:13 Robert Yang
2017-12-01 5:13 ` [PATCH 1/1 " Robert Yang
0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-12-01 5:13 UTC (permalink / raw)
To: openembedded-core
The following changes since commit addf309165059a113a6d02ea5fb29a0f495c1485:
usbutils: remove uclibc-specific patch (2017-11-29 23:41:38 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/use_qemu
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/use_qemu
Robert Yang (1):
targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
meta/classes/testimage.bbclass | 2 +-
meta/lib/oeqa/targetcontrol.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
2017-12-01 5:13 [PATCH 0/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM Robert Yang
@ 2017-12-01 5:13 ` Robert Yang
2017-12-05 16:10 ` Burton, Ross
0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-12-01 5:13 UTC (permalink / raw)
To: openembedded-core
So that both QEMU_USE_KVM = "True" and "1" will work.
[YOCTO #12343]
Signed-off-by: Robert Yang <liezhi.yang@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:
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
2017-12-01 5:13 ` [PATCH 1/1 " Robert Yang
@ 2017-12-05 16:10 ` Burton, Ross
2017-12-06 1:37 ` Robert Yang
0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-12-05 16:10 UTC (permalink / raw)
To: Robert Yang; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2006 bytes --]
On 1 December 2017 at 05:13, Robert Yang <liezhi.yang@windriver.com> wrote:
> So that both QEMU_USE_KVM = "True" and "1" will work.
>
> [YOCTO #12343]
>
> Signed-off-by: Robert Yang <liezhi.yang@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
[-- Attachment #2: Type: text/html, Size: 2961 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
2017-12-05 16:10 ` Burton, Ross
@ 2017-12-06 1:37 ` Robert Yang
2017-12-06 3:11 ` Robert Yang
0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-12-06 1:37 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 12/06/2017 12:10 AM, Burton, Ross wrote:
> On 1 December 2017 at 05:13, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
> So that both QEMU_USE_KVM = "True" and "1" will work.
>
> [YOCTO #12343]
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@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
Sorry, I had tried testimage and oe-selftest before and just now locally,
didn't see this error, need more investigations.
// Robert
>
> Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
2017-12-06 1:37 ` Robert Yang
@ 2017-12-06 3:11 ` Robert Yang
2017-12-06 10:02 ` Robert Yang
0 siblings, 1 reply; 6+ messages in thread
From: Robert Yang @ 2017-12-06 3:11 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 12/06/2017 09:37 AM, Robert Yang wrote:
>
> On 12/06/2017 12:10 AM, Burton, Ross wrote:
>> On 1 December 2017 at 05:13, Robert Yang <liezhi.yang@windriver.com
>> <mailto:liezhi.yang@windriver.com>> wrote:
>>
>> So that both QEMU_USE_KVM = "True" and "1" will work.
>>
>> [YOCTO #12343]
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>> <mailto:liezhi.yang@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
>
> Sorry, I had tried testimage and oe-selftest before and just now locally,
> didn't see this error, need more investigations.
I can reproduce it now:
Add QEMU_USE_KVM = "1" to con/local.conf
$ oe-selftest -r devtool.DevtoolTests.test_devtool_deploy_target
// Robert
>
> // Robert
>
>>
>> Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
2017-12-06 3:11 ` Robert Yang
@ 2017-12-06 10:02 ` Robert Yang
0 siblings, 0 replies; 6+ messages in thread
From: Robert Yang @ 2017-12-06 10:02 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
Hi Ross,
On 12/06/2017 11:11 AM, Robert Yang wrote:
>
>
> On 12/06/2017 09:37 AM, Robert Yang wrote:
>>
>> On 12/06/2017 12:10 AM, Burton, Ross wrote:
>>> On 1 December 2017 at 05:13, Robert Yang <liezhi.yang@windriver.com
>>> <mailto:liezhi.yang@windriver.com>> wrote:
>>>
>>> So that both QEMU_USE_KVM = "True" and "1" will work.
>>>
>>> [YOCTO #12343]
>>>
>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>>> <mailto:liezhi.yang@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
>>
>> Sorry, I had tried testimage and oe-selftest before and just now locally,
>> didn't see this error, need more investigations.
>
> I can reproduce it now:
>
> Add QEMU_USE_KVM = "1" to con/local.conf
> $ oe-selftest -r devtool.DevtoolTests.test_devtool_deploy_target
I fixed it in the repo:
git://git.openembedded.org/openembedded-core-contrib rbt/use_qemu
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/use_qemu
Robert Yang (1):
targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM
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..59a9c35 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -91,6 +91,8 @@ class QemuTarget(BaseTarget):
def __init__(self, d, logger, image_fstype=None):
+ import oe.types
+
super(QemuTarget, self).__init__(d, logger)
self.rootfs = ''
@@ -107,7 +109,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:
// Robert
>
> // Robert
>
>>
>> // Robert
>>
>>>
>>> Ross
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-12-06 10:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-01 5:13 [PATCH 0/1 V2] targetcontrol.py: use oe.types.boolean for QEMU_USE_KVM Robert Yang
2017-12-01 5:13 ` [PATCH 1/1 " Robert Yang
2017-12-05 16:10 ` Burton, Ross
2017-12-06 1:37 ` Robert Yang
2017-12-06 3:11 ` Robert Yang
2017-12-06 10:02 ` Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox