Patchwork [2/4] classes/testimage: create a link for qemu boot log

login
register
mail settings
Submitter Stanacar, StefanX
Date Aug. 9, 2013, 3:04 p.m.
Message ID <d8b5b32a1cadd19ea63ee286f7b9a264fde72e65.1376060086.git.stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/55421/
State Accepted
Commit bc4b98bd4ce8fcf2bedc09d172893aa770f68df0
Headers show

Comments

Stanacar, StefanX - Aug. 9, 2013, 3:04 p.m.
The full name for the log is confusing when there are multiple files.
Also move the ssh log path stuff where it's needed.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/classes/testimage.bbclass | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 903849d..86121e4 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -53,11 +53,6 @@  def testimage_main(d):
 
     testdir = d.getVar("TEST_LOG_DIR", True)
     bb.utils.mkdirhier(testdir)
-    sshlog = os.path.join(testdir, "ssh_target_log.%s" % d.getVar('DATETIME', True))
-    sshloglink = os.path.join(testdir, "ssh_target_log")
-    if os.path.islink(sshloglink):
-        os.unlink(sshloglink)
-    os.symlink(sshlog, sshloglink)
 
     # tests in TEST_SUITES become required tests
     # they won't be skipped even if they aren't suitable for a default image (like xorg for minimal)
@@ -103,9 +98,22 @@  def testimage_main(d):
     except ValueError:
         qemu.boottime = 500
 
+    qemuloglink = os.path.join(testdir, "qemu_boot_log")
+    if os.path.islink(qemuloglink):
+        os.unlink(qemuloglink)
+    os.symlink(qemu.logfile, qemuloglink)
+
+    sshlog = os.path.join(testdir, "ssh_target_log.%s" % d.getVar('DATETIME', True))
+    sshloglink = os.path.join(testdir, "ssh_target_log")
+    if os.path.islink(sshloglink):
+        os.unlink(sshloglink)
+    os.symlink(sshlog, sshloglink)
+
+
     bb.note("DISPLAY value: %s" % qemu.display)
     bb.note("rootfs file: %s" %  rootfs)
-    bb.note("Qemu logfile: %s" % qemu.logfile)
+    bb.note("Qemu log file: %s" % qemu.logfile)
+    bb.note("SSH log file: %s" %  sshlog)
 
     #catch exceptions when loading or running tests (mostly our own errors)
     try: