[OE-core] [PATCH v4 5/7] wic: selftest: do not repeat core-image-minimal
Maciej Borzęcki
maciej.borzecki at rndity.com
Wed Nov 23 11:39:26 UTC 2016
On Wed, Nov 23, 2016 at 12:23 PM, Ed Bartosh <ed.bartosh at linux.intel.com> wrote:
> On Wed, Nov 23, 2016 at 08:46:31AM +0100, Maciej Borzecki wrote:
>> Replace repeated core-image-minimal with Wic class field.
>>
>> Signed-off-by: Maciej Borzecki <maciej.borzecki at rndity.com>
>> ---
>> meta/lib/oeqa/selftest/wic.py | 111 +++++++++++++++++++++++++++---------------
>> 1 file changed, 73 insertions(+), 38 deletions(-)
>>
>> diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
>> index 2db14445956bc5adcf1e755844bbdb69edcb468f..37ed2c6de5a7f22f982f921476fa392304995b2e 100644
>> --- a/meta/lib/oeqa/selftest/wic.py
>> +++ b/meta/lib/oeqa/selftest/wic.py
>> @@ -57,6 +57,8 @@ class Wic(oeSelfTest):
>> resultdir = "/var/tmp/wic/build/"
>> image_is_ready = False
>>
>> + OE_IMAGE = "core-image-minimal"
>> +
>> def setUpLocal(self):
>> """This code is executed before each test method."""
>> arch = get_bb_var('HOST_ARCH', 'core-image-minimal')
>> @@ -75,7 +77,7 @@ class Wic(oeSelfTest):
>> tools += ' syslinux syslinux-native'
>> bitbake(tools)
>>
>> - bitbake('core-image-minimal')
>> + bitbake(self.OE_IMAGE)
>> Wic.image_is_ready = True
> I'd agree with Ross here - it looks less readable.
> How it would look if we decide to add test case for another image?
>
The usual way would be to:
class WicSatoImage(Wic):
OE_IMAGE = "core-image-sato"
But I think you make a fair point. The patch introduces unnecessary
complexity, and is not really needed right now. I'll drop this patch if next
version will be necessary.
Can you take a look at the rest of the patchset as well?
Thanks,
--
Maciej Borzecki
RnDity
More information about the Openembedded-core
mailing list