]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa: wic: use just isfile() instead of islink()
authorMartin Jansa <martin.jansa@gmail.com>
Sat, 18 Nov 2023 23:41:25 +0000 (00:41 +0100)
committerMartin Jansa <martin.jansa@gmail.com>
Fri, 12 Jul 2024 07:36:57 +0000 (09:36 +0200)
* with [YOCTO #12937] changes the manifest is hardlink not symlink

* fixes:
2023-11-18 23:48:55,695 - oe-selftest - INFO -  ... FAIL
2023-11-18 23:48:55,696 - oe-selftest - INFO - Traceback (most recent call last):
  File "/OE/build/poky/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/OE/build/poky/meta/lib/oeqa/selftest/cases/wic.py", line 836, in test_wic_image_type
    self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path)
AssertionError: False is not true : Link tmp/deploy/images/qemux86-64/wic-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.wic wasn't generated as expected

meta/lib/oeqa/selftest/cases/wic.py

index b616759209a23cf016fcbce1059f2c4f090e9cfe..d40fb37ea6bbff0c99c351bcf433202eee005138 100644 (file)
@@ -925,7 +925,7 @@ class Wic2(WicTestCase):
         # pointing to existing files
         for suffix in ('wic', 'manifest'):
             path = prefix + suffix
-            self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path)
+            self.assertTrue(os.path.isfile(path), msg="Link %s wasn't generated as expected" % path)
             self.assertTrue(os.path.isfile(os.path.realpath(path)), msg="File linked to by %s wasn't generated as expected" % path)
 
     # TODO this should work on aarch64