oeqa/utils/qemurunner: search for login string in the entire boot log

Submitted by Stanacar, StefanX on March 7, 2014, 2:20 p.m.


Message ID 1394202007-14964-1-git-send-email-stefanx.stanacar@intel.com
State Accepted
Commit 1117d25fdfabbf1afdc7030e05efc6a32df871e3
Headers show

Commit Message

Stanacar, StefanX March 7, 2014, 2:20 p.m.
If some service is to spammy we might miss the login, so search
in the entire log instead of just the last few lines.
Use qemu in regex too (to avoid a login string from some service).

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
 meta/lib/oeqa/utils/qemurunner.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 5366a63..c664d00 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -133,8 +133,7 @@  class QemuRunner:
                         if data:
                             self.bootlog += data
-                            lastlines = "\n".join(self.bootlog.splitlines()[-2:])
-                            if re.search("login:", lastlines):
+                            if re.search("qemu.* login:", self.bootlog):
                                 stopread = True
                                 reachedlogin = True
                                 bb.note("Reached login banner")