summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-02 13:58:03 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-03 12:43:25 +0100
commitbf41b068875cc0b37f4c58758ada720f46f93b29 (patch)
treebf050725e98dfa5f937276dba93451ce23e7bb72
parent7d4bb40905fab38fb3db1d0e17afbc803622f00c (diff)
downloadpoky-bf41b068875cc0b37f4c58758ada720f46f93b29.tar.gz
oe-selftest: wic: configure a build
Added MACHINE_FEATURES and IMAGE_FSTYPES variables to the build config to ensure that bootimg and efi artifacts are built. This is needed to build canned wic images that are using those artifacts. Introduced class variable Wic.image_is_ready to avoid building image more than once. It would be better to build image in setUpClass, which is called only once, but add_config method can't be called in class method, so we have to use this trick with class variable in setUp method. (From OE-Core rev: c5bb95704e00e7afdbcb2e02c1fbc74f33e26481) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/wic.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 6bc4b60519..817a820450 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -39,12 +39,21 @@ class Wic(oeSelfTest):
39 39
40 @classmethod 40 @classmethod
41 def setUpClass(cls): 41 def setUpClass(cls):
42 """Build wic runtime dependencies and images used in the tests.""" 42 """Build wic runtime dependencies."""
43 bitbake('syslinux syslinux-native parted-native gptfdisk-native ' 43 bitbake('syslinux syslinux-native parted-native gptfdisk-native '
44 'dosfstools-native mtools-native core-image-minimal') 44 'dosfstools-native mtools-native')
45 Wic.image_is_ready = False
45 46
46 def setUp(self): 47 def setUp(self):
47 """This code is executed before each test method.""" 48 """This code is executed before each test method."""
49 if not Wic.image_is_ready:
50 # build core-image-minimal with required features
51 features = 'IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n'
52 self.append_config(features)
53 bitbake('core-image-minimal')
54 # set this class variable to avoid buiding image many times
55 Wic.image_is_ready = True
56
48 rmtree(self.resultdir, ignore_errors=True) 57 rmtree(self.resultdir, ignore_errors=True)
49 58
50 def test01_help(self): 59 def test01_help(self):