]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/selftest/wic: cleanup WicTestCase.setUpLocal
authorRoss Burton <ross@burtonini.com>
Thu, 31 Mar 2022 18:29:11 +0000 (19:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Apr 2022 22:05:32 +0000 (23:05 +0100)
Use os.path.join to construct paths, and invoke bitbake once instead of
three times.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/lib/oeqa/selftest/cases/wic.py

index 2eb80ac1941a9ae34ff76fbd3e1987d465008ee7..6da70b8c2879a35beb3c81d5c9da4a181ad368a6 100644 (file)
@@ -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):