mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
oeqa/selftest/wic: use os.rename instead of bb.utils.rename
bb.utils.rename() only exists to handle moves across filesystems. As these moves are within the same directory we can just use os.rename(). (From OE-Core rev: 450e09b6d4ca019848aec4c62fce280a09395b97) 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
13a1e484c3
commit
6cd1a31bef
@@ -1416,8 +1416,8 @@ class Wic2(WicTestCase):
|
|||||||
result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
|
result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
|
||||||
self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
|
self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
|
||||||
|
|
||||||
bb.utils.rename(image_path, image_path + '.bak')
|
os.rename(image_path, image_path + '.bak')
|
||||||
bb.utils.rename(new_image_path, image_path)
|
os.rename(new_image_path, image_path)
|
||||||
|
|
||||||
# Check if it boots in qemu
|
# Check if it boots in qemu
|
||||||
with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as 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):
|
if os.path.exists(new_image_path):
|
||||||
os.unlink(new_image_path)
|
os.unlink(new_image_path)
|
||||||
if os.path.exists(image_path + '.bak'):
|
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):
|
def test_wic_ls_ext(self):
|
||||||
"""Test listing content of the ext partition using 'wic ls'"""
|
"""Test listing content of the ext partition using 'wic ls'"""
|
||||||
|
|||||||
Reference in New Issue
Block a user