summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-03-31 01:27:22 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-03 11:39:59 +0100
commit34aa323f18007ba839c153f7db7fc672b0265f89 (patch)
tree5e9557b4c82372be642e97f93714a825cee12ece /meta/lib/oeqa/selftest/cases
parentedd4fe8cb383c280474c53dcd4931c4cfb31dca5 (diff)
downloadpoky-34aa323f18007ba839c153f7db7fc672b0265f89.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: 7a0f622f23aff2c4eeca0606e7682931eb53287a) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r--meta/lib/oeqa/selftest/cases/runqemu.py3
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 e1093c67c7..3f8760a5ba 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -62,7 +62,8 @@ SYSLINUX_TIMEOUT = "10"
62 cmd = "%s %s ext4" % (self.cmd_common, self.machine) 62 cmd = "%s %s ext4" % (self.cmd_common, self.machine)
63 with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu: 63 with runqemu(self.recipe, ssh=False, launch_cmd=cmd) as qemu:
64 with open(qemu.qemurunnerlog) as f: 64 with open(qemu.qemurunnerlog) as f:
65 self.assertIn('rootfs.ext4', f.read(), "Failed: %s" % cmd) 65 regexp = r'\nROOTFS: .*\.ext4]\n'
66 self.assertRegex(f.read(), regexp, "Failed to find '%s' in '%s' after running '%s'" % (regexp, qemu.qemurunnerlog, cmd))
66 67
67 @skipIfNotArch(['i586', 'i686', 'x86_64']) 68 @skipIfNotArch(['i586', 'i686', 'x86_64'])
68 def test_boot_machine_iso(self): 69 def test_boot_machine_iso(self):