[OE-core] [PATCH v3 22/22] classes/testimage: Fix exportTests function.

Aníbal Limón anibal.limon at linux.intel.com
Thu Feb 4 22:29:39 UTC 2016


With new structure of TestContext now holds suite and variable
that contains unittest instances,  it can't be exported using
JSON causing and exception.

Adds the suite variable for avoid export it.

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 meta/classes/testimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 5fafda1..7fff29f 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -112,7 +112,7 @@ def exportTests(d,tc):
     savedata["host_dumper"] = {}
     for key in tc.__dict__:
         # special cases
-        if key != "d" and key != "target" and key != "host_dumper":
+        if key not in ['d', 'target', 'host_dumper', 'suite']:
             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)
-- 
2.1.4




More information about the Openembedded-core mailing list