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>
This commit is contained in:
Mariano Lopez
2015-08-24 19:04:02 -05:00
committed by Richard Purdie
parent d14ffaf6a3
commit 85fd1a7a12
4 changed files with 91 additions and 49 deletions

View File

@@ -231,6 +231,7 @@ def testimage_main(d):
import time
from oeqa.oetest import loadTests, runTests
from oeqa.targetcontrol import get_target_controller
from oeqa.utils.dump import get_host_dumper
pn = d.getVar("PN", True)
export = oe.utils.conditional("TEST_EXPORT_ONLY", "1", True, False, d)
@@ -245,6 +246,9 @@ def testimage_main(d):
testslist = get_tests_list(d)
testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"]
# we need the host dumper in test context
host_dumper = get_host_dumper(d)
# the robot dance
target = get_target_controller(d)
@@ -255,6 +259,7 @@ def testimage_main(d):
self.testsrequired = testsrequired
self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files")
self.target = target
self.host_dumper = host_dumper
self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest")