summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/wic.py
diff options
context:
space:
mode:
authorDevendra Tewari <devendra.tewari@gmail.com>2021-04-19 11:23:58 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-06 11:16:23 +0100
commitb71375304f393db62e0894af66e9a60bb9a5c8cc (patch)
treeac14a351c1c6cd0ba2679c18a4de92c71dee0e7f /meta/lib/oeqa/selftest/cases/wic.py
parent974441aeda1a2e601865743e945e0332c115ef76 (diff)
downloadpoky-b71375304f393db62e0894af66e9a60bb9a5c8cc.tar.gz
classes/lib/scripts: Use bb.utils.rename() instead of os.rename()
Incremental build in Docker fails with: OSError: [Errno 18] Invalid cross-device link when source and destination are on different overlay filesystems. Rather than adding fallback code to every call site, use a new wrapper in bitbake which detects this case and falls back to shutil.move which is slower but will handtle the overlay docker filesystems correctly. [YOCTO #14301] (From OE-Core rev: 656a65b2b84e7d529b89cf5de7eb838f902d84a2) 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.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index fa81584a8c..a11e2d0781 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1306,8 +1306,8 @@ class Wic2(WicTestCase):
1306 result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path)) 1306 result = runCmd("%s/usr/sbin/sfdisk -F %s" % (sysroot, new_image_path))
1307 self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output) 1307 self.assertTrue("0 B, 0 bytes, 0 sectors" in result.output)
1308 1308
1309 os.rename(image_path, image_path + '.bak') 1309 bb.utils.rename(image_path, image_path + '.bak')
1310 os.rename(new_image_path, image_path) 1310 bb.utils.rename(new_image_path, image_path)
1311 1311
1312 # Check if it boots in qemu 1312 # Check if it boots in qemu
1313 with runqemu('core-image-minimal', ssh=False) as qemu: 1313 with runqemu('core-image-minimal', ssh=False) as qemu:
@@ -1318,7 +1318,7 @@ class Wic2(WicTestCase):
1318 if os.path.exists(new_image_path): 1318 if os.path.exists(new_image_path):
1319 os.unlink(new_image_path) 1319 os.unlink(new_image_path)
1320 if os.path.exists(image_path + '.bak'): 1320 if os.path.exists(image_path + '.bak'):
1321 os.rename(image_path + '.bak', image_path) 1321 bb.utils.rename(image_path + '.bak', image_path)
1322 1322
1323 def test_wic_ls_ext(self): 1323 def test_wic_ls_ext(self):
1324 """Test listing content of the ext partition using 'wic ls'""" 1324 """Test listing content of the ext partition using 'wic ls'"""