As part of the solution to replace Testopia to store testresult,
OEQA sdk and sdkext need to output testresult into json files, where
these json testresult files will be stored into git repository
by the future test-case-management tools.

Signed-off-by: Yeoh Ee Peng <ee.peng.y...@intel.com>
---
 meta/classes/testsdk.bbclass | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index d3f475d..ef4d160 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -80,8 +80,13 @@ def testsdk_main(d):
 
         component = "%s %s" % (pn, OESDKTestContextExecutor.name)
         context_msg = "%s:%s" % (os.path.basename(tcname), 
os.path.basename(sdk_env))
-
-        result.logDetails()
+        image = d.getVar("IMAGE_BASENAME")
+        json_result_dir = os.path.join(d.getVar("WORKDIR"),
+                                       'temp',
+                                       'json_testresults-%s' % os.getpid(),
+                                       'sdk',
+                                       image)
+        result.logDetails(json_result_dir, {'TEST_TYPE': 'sdk', 
'IMAGE_BASENAME': image})
         result.logSummary(component, context_msg)
 
         if not result.wasSuccessful():
@@ -184,8 +189,13 @@ def testsdkext_main(d):
 
         component = "%s %s" % (pn, OESDKExtTestContextExecutor.name)
         context_msg = "%s:%s" % (os.path.basename(tcname), 
os.path.basename(sdk_env))
-
-        result.logDetails()
+        image = d.getVar("IMAGE_BASENAME")
+        json_result_dir = os.path.join(d.getVar("WORKDIR"),
+                                       'temp',
+                                       'json_testresults-%s' % os.getpid(),
+                                       'sdkext',
+                                       image)
+        result.logDetails(json_result_dir, {'TEST_TYPE': 'sdkext', 
'IMAGE_BASENAME': image})
         result.logSummary(component, context_msg)
 
         if not result.wasSuccessful():
-- 
2.7.4

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to