diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2015-08-24 19:04:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 12:36:12 +0100 |
commit | 85fd1a7a121daffc3c5c530930f832ecc61ef83d (patch) | |
tree | ee70ad65c0392775d8a4da174bd992e8e760c2e9 /meta/classes/testimage.bbclass | |
parent | d14ffaf6a366442bcf88e44ee3e105f9dea1e69c (diff) | |
download | poky-85fd1a7a121daffc3c5c530930f832ecc61ef83d.tar.gz |
dump: Created new classes for dump host and target
It makes sense to separate the dump commands from the
oeRuntimeTest class, this way it can be used in all
the test context.
These are the changes included in this patch:
- Created classes: BaseDumper, HostDumper, TargetDumper
- Create an instance of HostDumper in imagetest.bbclass
and add it to TestContext class, this way any class
that have access to the TestContext would be able
to dump logs from the host
- Create an instance of TargetDumper in QemuTarget
class after get the runner, this way it is
accessible during the tests.
[YOCTO #8118]
(From OE-Core rev: ad10af6be343b5425fde43055263b0744c161cb3)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r-- | meta/classes/testimage.bbclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 1d9464f5e9..824b47f5dd 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -231,6 +231,7 @@ def testimage_main(d): | |||
231 | import time | 231 | import time |
232 | from oeqa.oetest import loadTests, runTests | 232 | from oeqa.oetest import loadTests, runTests |
233 | from oeqa.targetcontrol import get_target_controller | 233 | from oeqa.targetcontrol import get_target_controller |
234 | from oeqa.utils.dump import get_host_dumper | ||
234 | 235 | ||
235 | pn = d.getVar("PN", True) | 236 | pn = d.getVar("PN", True) |
236 | export = oe.utils.conditional("TEST_EXPORT_ONLY", "1", True, False, d) | 237 | export = oe.utils.conditional("TEST_EXPORT_ONLY", "1", True, False, d) |
@@ -245,6 +246,9 @@ def testimage_main(d): | |||
245 | testslist = get_tests_list(d) | 246 | testslist = get_tests_list(d) |
246 | testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"] | 247 | testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"] |
247 | 248 | ||
249 | # we need the host dumper in test context | ||
250 | host_dumper = get_host_dumper(d) | ||
251 | |||
248 | # the robot dance | 252 | # the robot dance |
249 | target = get_target_controller(d) | 253 | target = get_target_controller(d) |
250 | 254 | ||
@@ -255,6 +259,7 @@ def testimage_main(d): | |||
255 | self.testsrequired = testsrequired | 259 | self.testsrequired = testsrequired |
256 | self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files") | 260 | self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files") |
257 | self.target = target | 261 | self.target = target |
262 | self.host_dumper = host_dumper | ||
258 | self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() | 263 | self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() |
259 | self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() | 264 | self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() |
260 | manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest") | 265 | manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest") |