[OE-core] [PATCH 21/21] classes/testimage: Fix exportTests function.

Aníbal Limón anibal.limon at linux.intel.com
Tue Feb 2 22:33:06 UTC 2016



On 02/02/2016 04:30 PM, Paul Eggleton wrote:
> On Tue, 02 Feb 2016 12:09:37 Aníbal Limón wrote:
>> With new structure of TestContext now holds suite and variable
>> that contains unittest instances,  it can't be exported using
>> JSON causing and exception.
>>
>> Adds the suite variable for avoid export it.
>>
>> Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
>> ---
>>  meta/classes/testimage.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
>> index 5fafda1..57858e6 100644
>> --- a/meta/classes/testimage.bbclass
>> +++ b/meta/classes/testimage.bbclass
>> @@ -112,7 +112,7 @@ def exportTests(d,tc):
>>      savedata["host_dumper"] = {}
>>      for key in tc.__dict__:
>>          # special cases
>> -        if key != "d" and key != "target" and key != "host_dumper":
>> +        if key != "d" and key != "target" and key != "host_dumper" and key
>> != "suite": savedata[key] = getattr(tc, key)
> 
> Given how long this is getting we might want to change to:
> 
>   if key not in ['d', 'target', 'host_dumper', 'suite']:

Good one...

> 
> Cheers,
> Paul
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160202/b6ee8083/attachment-0002.sig>


More information about the Openembedded-core mailing list