]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/runtime/_qemutiny: rewrite test to be functional
authorRoss Burton <ross.burton@arm.com>
Tue, 10 Oct 2023 12:54:58 +0000 (13:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 Oct 2023 08:42:01 +0000 (09:42 +0100)
The _qemutiny is a small test case that was explicitly designed to do a
minimal level of testing for poky-tiny images.  These typically don't
have SSH servers so we need to assume that qemu is being used and access
the serial console directly.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/_qemutiny.py

index 14ff8b98b22a08ce255a8eb5aafbd70344d3919c..816fd4a7cb542030ec3fd4514be169b22d4b39ae 100644 (file)
@@ -5,10 +5,15 @@
 #
 
 from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.target.qemu import OEQemuTarget
 
 class QemuTinyTest(OERuntimeTestCase):
 
     def test_boot_tiny(self):
-        status, output = self.target.run_serial('uname -a')
-        msg = "Cannot detect poky tiny boot!"
-        self.assertTrue("yocto-tiny" in output, msg)
+        # Until the target has explicit run_serial support, check that the
+        # target is the qemu runner
+        if isinstance(self.target, OEQemuTarget):
+            status, output = self.target.runner.run_serial('uname -a')
+            self.assertIn("Linux", output)
+        else:
+            self.skipTest("Target %s is not OEQemuTarget" % self.target)