summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:28:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:11:37 +0100
commit6cd1a31bef217683152f5575592d04bf32861971 (patch)
tree74c24a73b6cc0a8a6dff0142982414353a151c84 /meta/lib/oeqa/selftest/cases/wic.py
parent13a1e484c3ea5a6463090cae86860e5afa08c999 (diff)
downloadpoky-6cd1a31bef217683152f5575592d04bf32861971.tar.gz
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>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/wic.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 6f3dc27743..673942fc9c 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1416,8 +1416,8 @@ class Wic2(WicTestCase):
1416 result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path)) 1416 result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
1417 self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output) 1417 self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
1418 1418
1419 bb.utils.rename(image_path, image_path + '.bak') 1419 os.rename(image_path, image_path + '.bak')
1420 bb.utils.rename(new_image_path, image_path) 1420 os.rename(new_image_path, image_path)
1421 1421
1422 # Check if it boots in qemu 1422 # Check if it boots in qemu
1423 with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu: 1423 with runqemu('core-image-minimal', ssh=False, runqemuparams='nographic') as qemu:
@@ -1428,7 +1428,8 @@ class Wic2(WicTestCase):
1428 if os.path.exists(new_image_path): 1428 if os.path.exists(new_image_path):
1429 os.unlink(new_image_path) 1429 os.unlink(new_image_path)
1430 if os.path.exists(image_path + '.bak'): 1430 if os.path.exists(image_path + '.bak'):
1431 bb.utils.rename(image_path + '.bak', image_path) 1431 os.rename(image_path + '.bak', image_path)
1432
1432 1433
1433 def test_wic_ls_ext(self): 1434 def test_wic_ls_ext(self):
1434 """Test listing content of the ext partition using 'wic ls'""" 1435 """Test listing content of the ext partition using 'wic ls'"""