]> code.ossystems Code Review - openembedded-core.git/commitdiff
runtime_test.py: correct output check for bash 5.1
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 28 Dec 2020 20:04:35 +0000 (21:04 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jan 2021 00:49:46 +0000 (00:49 +0000)
Bash 5.1 inserts escape sequences into its output (specifically
disabling bracketed paste mode via \x1b[?2004l). I am not sure
if somehow terminal detection isn't working correctly there,
but in any case the marker is still in the output, but needs to
be checked by 'in' rather than exact equivalence.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/runtime_test.py

index 7189e4e6c53d8004f9e82e9e64aceb9cba817a52..b20c5b427bb89f4474ddd54a17a6dad81dad3922 100644 (file)
@@ -276,7 +276,7 @@ class Postinst(OESelftestTestCase):
                     # run_serial()'s status code is useless.'
                     for filename in ("rootfs", "delayed-a", "delayed-b"):
                         status, output = qemu.run_serial("test -f %s && echo found" % os.path.join(targettestdir, filename))
-                        self.assertEqual(output, "found", "%s was not present on boot" % filename)
+                        self.assertIn("found", output, "%s was not present on boot" % filename)