From 339ccc0c2bd2801d83cb65b22c6cdb8a93d25bb2 Mon Sep 17 00:00:00 2001 From: Mikko Rapeli Date: Thu, 4 Jan 2024 12:14:37 +0200 Subject: runqemu: match .rootfs. in addition to -image- for rootfs Also change path.exists() and !path.isdir() to a single path.isfile() which should be equal. Enables running tests against image recipes which are not called "bla-image" but plain "bla". Currently they fail with do_testimage/runqemu error: runqemu - ERROR - Unknown path arg /home/builder/src/base/build/tmp_qemuarm64/deploy/images/qemuarm64/img-qemuarm64.rootfs.wic Suggested-by: Richard Purdie (From OE-Core rev: 107d0db3dc3678e6f0ae4035f4c0b86c6b421168) Signed-off-by: Mikko Rapeli Signed-off-by: Richard Purdie --- scripts/runqemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/runqemu') diff --git a/scripts/runqemu b/scripts/runqemu index f4d0420109..69cd44864e 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -375,7 +375,7 @@ class BaseConfig(object): re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p - elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p): + elif os.path.isfile(p) and ('-image-' in os.path.basename(p) or '.rootfs.' in os.path.basename(p)): self.rootfs = p # Check filename against self.fstypes can handle .cpio.gz, # otherwise, its type would be "gz", which is incorrect. -- cgit v1.2.3-54-g00ecf