mirror of
https://git.yoctoproject.org/poky
synced 2026-03-17 20:59:42 +01:00
oeqa/selftest/wic: cleanup WicTestCase.setUpLocal
Use os.path.join to construct paths, and invoke bitbake once instead of three times. (From OE-Core rev: 27953d4cf6edc86cd505826c3da21222864c7760) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
679917f98f
commit
443d557ba0
@@ -75,22 +75,18 @@ class WicTestCase(OESelftestTestCase):
|
||||
|
||||
def setUpLocal(self):
|
||||
"""This code is executed before each test method."""
|
||||
self.resultdir = self.builddir + "/wic-tmp/"
|
||||
self.resultdir = os.path.join(self.builddir, "wic-tmp")
|
||||
super(WicTestCase, self).setUpLocal()
|
||||
|
||||
# Do this here instead of in setUpClass as the base setUp does some
|
||||
# clean up which can result in the native tools built earlier in
|
||||
# setUpClass being unavailable.
|
||||
if not WicTestCase.image_is_ready:
|
||||
if get_bb_var('USE_NLS') == 'yes':
|
||||
bitbake('wic-tools')
|
||||
else:
|
||||
self.skipTest('wic-tools cannot be built due its (intltool|gettext)-native dependency and NLS disable')
|
||||
if get_bb_var('USE_NLS') != 'yes':
|
||||
self.skipTest('wic-tools needs USE_NLS=yes')
|
||||
|
||||
bitbake('core-image-minimal')
|
||||
bitbake('core-image-minimal-mtdutils')
|
||||
bitbake('wic-tools core-image-minimal core-image-minimal-mtdutils')
|
||||
WicTestCase.image_is_ready = True
|
||||
|
||||
rmtree(self.resultdir, ignore_errors=True)
|
||||
|
||||
def tearDownLocal(self):
|
||||
|
||||
Reference in New Issue
Block a user