summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:29:11 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:11:37 +0100
commit443d557ba0b111fbf616da9f314518d6a86f0386 (patch)
treef325a69bf7e90ed000ee17da37ce0bbf7621851b /meta/lib
parent679917f98f081672bb3331aeafab507f1fac6f17 (diff)
downloadpoky-443d557ba0b111fbf616da9f314518d6a86f0386.tar.gz
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>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 2eb80ac194..6da70b8c28 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -75,22 +75,18 @@ class WicTestCase(OESelftestTestCase):
75 75
76 def setUpLocal(self): 76 def setUpLocal(self):
77 """This code is executed before each test method.""" 77 """This code is executed before each test method."""
78 self.resultdir = self.builddir + "/wic-tmp/" 78 self.resultdir = os.path.join(self.builddir, "wic-tmp")
79 super(WicTestCase, self).setUpLocal() 79 super(WicTestCase, self).setUpLocal()
80 80
81 # Do this here instead of in setUpClass as the base setUp does some 81 # Do this here instead of in setUpClass as the base setUp does some
82 # clean up which can result in the native tools built earlier in 82 # clean up which can result in the native tools built earlier in
83 # setUpClass being unavailable. 83 # setUpClass being unavailable.
84 if not WicTestCase.image_is_ready: 84 if not WicTestCase.image_is_ready:
85 if get_bb_var('USE_NLS') == 'yes': 85 if get_bb_var('USE_NLS') != 'yes':
86 bitbake('wic-tools') 86 self.skipTest('wic-tools needs USE_NLS=yes')
87 else:
88 self.skipTest('wic-tools cannot be built due its (intltool|gettext)-native dependency and NLS disable')
89 87
90 bitbake('core-image-minimal') 88 bitbake('wic-tools core-image-minimal core-image-minimal-mtdutils')
91 bitbake('core-image-minimal-mtdutils')
92 WicTestCase.image_is_ready = True 89 WicTestCase.image_is_ready = True
93
94 rmtree(self.resultdir, ignore_errors=True) 90 rmtree(self.resultdir, ignore_errors=True)
95 91
96 def tearDownLocal(self): 92 def tearDownLocal(self):