[oe-commits] Mariano Lopez : qemurunner.py: Added login to start method

git at git.openembedded.org git at git.openembedded.org
Sun Aug 16 08:32:22 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: cc2b1c28801399c6b525248fa0dabf7c42afc714
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=cc2b1c28801399c6b525248fa0dabf7c42afc714

Author: Mariano Lopez <mariano.lopez at linux.intel.com>
Date:   Tue Aug 11 13:41:04 2015 +0000

qemurunner.py: Added login to start method

This adds the automatic login after the target
finished booting. If the automatic login fails
it won't stop the target or any test, it would
only send a log to the file.

[YOCTO #8118]

Signed-off-by: Mariano Lopez <mariano.lopez at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/lib/oeqa/utils/qemurunner.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 81ca32e..fc2e244 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -37,6 +37,7 @@ class QemuRunner:
         self.deploy_dir_image = deploy_dir_image
         self.logfile = logfile
         self.boottime = boottime
+        self.logged = False
 
         self.runqemutime = 60
 
@@ -159,6 +160,7 @@ class QemuRunner:
                             self.log(data)
                             self.bootlog += data
                             if re.search(".* login:", self.bootlog):
+                                self.server_socket = self.qemusock
                                 stopread = True
                                 reachedlogin = True
                                 logger.info("Reached login banner")
@@ -174,6 +176,15 @@ class QemuRunner:
                 logger.info("Check full boot log: %s" % self.logfile)
                 self.stop()
                 return False
+
+            (status, output) = self.run_serial("root\n")
+            if re.search("root@[a-zA-Z0-9\-]+:~#", output):
+                self.logged = True
+                logger.info("Logged as root in serial console")
+            else:
+                logger.info("Couldn't login into serial console"
+                        " as root using blank password")
+
         else:
             logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
             self.stop()



More information about the Openembedded-commits mailing list