summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/targetcontrol.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-07-27 14:04:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 23:29:14 +0100
commit01ccad15dab5743ab1cb0f566e48167672389fdd (patch)
tree6b37b841d893ce1c57c466649cb1ee7f6a7fe6cb /meta/lib/oeqa/targetcontrol.py
parenta6eb5ec327bacb592eaa116a566a55ba509b7aa5 (diff)
downloadpoky-01ccad15dab5743ab1cb0f566e48167672389fdd.tar.gz
oeqa/targetcontrol: write QemuRunner log output to a file
If we use this outside of testimage we don't have a task log; so let's just explicitly write the log output to a file all the time so it's always there to look at (particularly useful when runqemu exits immediately with an error.) (From OE-Core rev: 09b7ed39df150257cfe2eb55a8f8c7475e73217e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r--meta/lib/oeqa/targetcontrol.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index beacdaf34a..138e61786b 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -10,6 +10,7 @@ import subprocess
10import bb 10import bb
11import traceback 11import traceback
12import sys 12import sys
13import logging
13from oeqa.utils.sshcontrol import SSHControl 14from oeqa.utils.sshcontrol import SSHControl
14from oeqa.utils.qemurunner import QemuRunner 15from oeqa.utils.qemurunner import QemuRunner
15from oeqa.utils.qemutinyrunner import QemuTinyRunner 16from oeqa.utils.qemutinyrunner import QemuTinyRunner
@@ -123,6 +124,16 @@ class QemuTarget(BaseTarget):
123 self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype) 124 self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
124 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') 125 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
125 126
127 # Log QemuRunner log output to a file
128 import oe.path
129 bb.utils.mkdirhier(self.testdir)
130 self.qemurunnerlog = os.path.join(self.testdir, 'qemurunner_log.%s' % self.datetime)
131 logger = logging.getLogger('BitBake.QemuRunner')
132 loggerhandler = logging.FileHandler(self.qemurunnerlog)
133 loggerhandler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))
134 logger.addHandler(loggerhandler)
135 oe.path.symlink(os.path.basename(self.qemurunnerlog), os.path.join(self.testdir, 'qemurunner_log'), force=True)
136
126 if d.getVar("DISTRO", True) == "poky-tiny": 137 if d.getVar("DISTRO", True) == "poky-tiny":
127 self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True), 138 self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
128 rootfs=self.rootfs, 139 rootfs=self.rootfs,