]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest/wic: use os.rename instead of bb.utils.rename
authorRoss Burton <ross@burtonini.com>
Thu, 31 Mar 2022 18:28:56 +0000 (19:28 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Apr 2022 22:05:31 +0000 (23:05 +0100)
bb.utils.rename() only exists to handle moves across filesystems. As
these moves are within the same directory we can just use os.rename().

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 6f3dc277439acf8cb5bdd0ff088b5922420b72cd..673942fc9ccce4fffc0882385843647bcab1b12d 100644 (file)
@@ -1416,8 +1416,8 @@ class Wic2(WicTestCase):
             result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
             self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
 
-            bb.utils.rename(image_path, image_path + '.bak')
-            bb.utils.rename(new_image_path, image_path)
+            os.rename(image_path, image_path + '.bak')
+            os.rename(new_image_path, image_path)
 
             # Check if it boots in qemu
             with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu:
@@ -1428,7 +1428,8 @@ class Wic2(WicTestCase):
             if os.path.exists(new_image_path):
                 os.unlink(new_image_path)
             if os.path.exists(image_path + '.bak'):
-                bb.utils.rename(image_path + '.bak', image_path)
+                os.rename(image_path + '.bak', image_path)
+
 
     def test_wic_ls_ext(self):
         """Test listing content of the ext partition using 'wic ls'"""