summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-08-11 13:41:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-16 09:24:59 +0100
commita5bfa110f6bb24523bf78718552cb092d507bab6 (patch)
tree251154c80c53509056c523730ba6d382a2db05bd /meta
parent78e1c4f146e8536513ff3301f054e66c2fea00a4 (diff)
downloadpoky-a5bfa110f6bb24523bf78718552cb092d507bab6.tar.gz
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] (From OE-Core rev: cc2b1c28801399c6b525248fa0dabf7c42afc714) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 81ca32e11b..fc2e244a7f 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -37,6 +37,7 @@ class QemuRunner:
37 self.deploy_dir_image = deploy_dir_image 37 self.deploy_dir_image = deploy_dir_image
38 self.logfile = logfile 38 self.logfile = logfile
39 self.boottime = boottime 39 self.boottime = boottime
40 self.logged = False
40 41
41 self.runqemutime = 60 42 self.runqemutime = 60
42 43
@@ -159,6 +160,7 @@ class QemuRunner:
159 self.log(data) 160 self.log(data)
160 self.bootlog += data 161 self.bootlog += data
161 if re.search(".* login:", self.bootlog): 162 if re.search(".* login:", self.bootlog):
163 self.server_socket = self.qemusock
162 stopread = True 164 stopread = True
163 reachedlogin = True 165 reachedlogin = True
164 logger.info("Reached login banner") 166 logger.info("Reached login banner")
@@ -174,6 +176,15 @@ class QemuRunner:
174 logger.info("Check full boot log: %s" % self.logfile) 176 logger.info("Check full boot log: %s" % self.logfile)
175 self.stop() 177 self.stop()
176 return False 178 return False
179
180 (status, output) = self.run_serial("root\n")
181 if re.search("root@[a-zA-Z0-9\-]+:~#", output):
182 self.logged = True
183 logger.info("Logged as root in serial console")
184 else:
185 logger.info("Couldn't login into serial console"
186 " as root using blank password")
187
177 else: 188 else:
178 logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime) 189 logger.info("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
179 self.stop() 190 self.stop()