diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2023-03-31 01:27:22 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-04-14 06:30:30 -1000 |
commit | 8764b68756d8ff8054028b78364fef8dc4a11258 (patch) | |
tree | 69fcb2549c91863ba791c96e2595f55478ea015f /meta/lib | |
parent | cd8f96966965c8cf0adfbd5a13581158f8acaeab (diff) | |
download | poky-8764b68756d8ff8054028b78364fef8dc4a11258.tar.gz |
selftest: runqemu: better check for ROOTFS: in the log
* it was searching for line like this:
ROOTFS: [/OE/build/poky/build/build-st-2023-03-20-esdk-runqemu-patch1/runqemu.RunqemuTests.test_boot_machine_ext4/build-st/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64-20230320081121.rootfs.ext4]
but with IMAGE_NAME_SUFFIX changed to something else than default ".rootfs"
or with my pending changes the line looks like this:
ROOTFS: [/OE/build/poky/build/build-st-2023-03-20-esdk-runqemu-patch2/runqemu.RunqemuTests.test_boot_machine_ext4/build-st/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs-20230320085744.ext4]
and test was failing.
* Check for whole line starting with ROOTFS: and ending just with .ext4
[YOCTO #12937]
(From OE-Core rev: 1079fade975c54b62b0187b1acd9c9475a5bbe7e)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 7a0f622f23aff2c4eeca0606e7682931eb53287a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/runqemu.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index 72ca77b845..e72dc1036e 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py | |||
@@ -57,7 +57,8 @@ SYSLINUX_TIMEOUT = "10" | |||
57 | cmd = "%s %s ext4" % (self.cmd_common, self.machine) | 57 | cmd = "%s %s ext4" % (self.cmd_common, self.machine) |
58 | with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: | 58 | with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: |
59 | with open(qemu.qemurunnerlog) as f: | 59 | with open(qemu.qemurunnerlog) as f: |
60 | self.assertIn('rootfs.ext4', f.read(), "Failed: %s" % cmd) | 60 | regexp = r'\nROOTFS: .*\.ext4]\n' |
61 | self.assertRegex(f.read(), regexp, "Failed to find '%s' in '%s' after running '%s'" % (regexp, qemu.qemurunnerlog, cmd)) | ||
61 | 62 | ||
62 | def test_boot_machine_iso(self): | 63 | def test_boot_machine_iso(self): |
63 | """Test runqemu machine iso""" | 64 | """Test runqemu machine iso""" |