summaryrefslogtreecommitdiff
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-09-01 07:36:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 21:47:12 +0100
commit25814dbdd12db0499e4d81876873158e1b8a4fcc (patch)
tree37fad2b8360a5c85941ddc6aac83e765f49abc52 /meta/classes/testimage.bbclass
parentb0af40fb76cd5035696e9d8a44f815f64214d23a (diff)
downloadopenembedded-core-25814dbdd12db0499e4d81876873158e1b8a4fcc.tar.gz
openembedded-core-25814dbdd12db0499e4d81876873158e1b8a4fcc.tar.bz2
openembedded-core-25814dbdd12db0499e4d81876873158e1b8a4fcc.zip
runexported: Make it compatible with host dump
Currently it is not possible to run a exported test, but this patch will allow to use the HosDumper class when running a exported test, otherwise the HostDumper class will break runexpored test. [YOCTO #8118] 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.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 82cb0110e3..8fa00f5fbf 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -173,9 +173,10 @@ def exportTests(d,tc):
savedata = {}
savedata["d"] = {}
savedata["target"] = {}
+ savedata["host_dumper"] = {}
for key in tc.__dict__:
# special cases
- if key != "d" and key != "target":
+ if key != "d" and key != "target" and key != "host_dumper":
savedata[key] = getattr(tc, key)
savedata["target"]["ip"] = tc.target.ip or d.getVar("TEST_TARGET_IP", True)
savedata["target"]["server_ip"] = tc.target.server_ip or d.getVar("TEST_SERVER_IP", True)
@@ -189,6 +190,9 @@ def exportTests(d,tc):
# we don't care about those anyway
pass
+ savedata["host_dumper"]["parent_dir"] = tc.host_dumper.parent_dir
+ savedata["host_dumper"]["cmds"] = tc.host_dumper.cmds
+
with open(os.path.join(exportpath, "testdata.json"), "w") as f:
json.dump(savedata, f, skipkeys=True, indent=4, sort_keys=True)