Apologize, please ignore this email

-----Original Message-----
From: Mohamad, Mazliana 
Sent: Monday, March 11, 2019 4:31 PM
To: openembedded-core@lists.openembedded.org
Cc: Mohamad, Mazliana <mazliana.moha...@intel.com>; Yeoh, Ee Peng 
<ee.peng.y...@intel.com>
Subject: [PATCH] scripts/resulttool: Enhance retrieving test cases value

From: Mazliana <mazliana.moha...@intel.com>

We found that manualexecution does not capture test suite values correctly if 
there are more than one test suite in test cases.
After verification has made we found out we should retrieved full test cases 
value <test_module.test_suite.test_case> from oeqa/manual/ json file rather 
than split it them into new variables test_suite and test_cases.

Signed-off-by: Mazliana <mazliana.moha...@intel.com>
---
 scripts/lib/resulttool/manualexecution.py | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/scripts/lib/resulttool/manualexecution.py 
b/scripts/lib/resulttool/manualexecution.py
index a44cc86..6487cd9 100755
--- a/scripts/lib/resulttool/manualexecution.py
+++ b/scripts/lib/resulttool/manualexecution.py
@@ -29,8 +29,7 @@ class ManualTestRunner(object):
     def __init__(self):
         self.jdata = ''
         self.test_module = ''
-        self.test_suite = ''
-        self.test_cases = ''
+        self.test_cases_id = ''
         self.configuration = ''
         self.starttime = ''
         self.result_id = ''
@@ -38,11 +37,10 @@ class ManualTestRunner(object):
 
     def _get_testcases(self, file):
         self.jdata = load_json_file(file)
-        self.test_cases = []
+        self.test_cases_id = []
         self.test_module = self.jdata[0]['test']['@alias'].split('.', 2)[0]
-        self.test_suite = self.jdata[0]['test']['@alias'].split('.', 2)[1]
         for i in self.jdata:
-            self.test_cases.append(i['test']['@alias'].split('.', 2)[2])
+            self.test_cases_id.append(i['test']['@alias'])
     
     def _get_input(self, config):
         while True:
@@ -81,10 +79,9 @@ class ManualTestRunner(object):
 
     def _execute_test_steps(self, test_id):
         test_result = {}
-        testcase_id = self.test_module + '.' + self.test_suite + '.' + 
self.test_cases[test_id]
         total_steps = len(self.jdata[test_id]['test']['execution'].keys())
         
print('------------------------------------------------------------------------')
-        print('Executing test case:' + '' '' + self.test_cases[test_id])
+        print('Executing test case:' + '' '' + 
+ self.test_cases_id[test_id])
         
print('------------------------------------------------------------------------')
         print('You have total ' + str(total_steps) + ' test steps to be 
executed.')
         
print('------------------------------------------------------------------------\n')
@@ -105,9 +102,9 @@ class ManualTestRunner(object):
                         res = result_types[r]
                         if res == 'FAILED':
                             log_input = input('\nPlease enter the error and 
the description of the log: (Ex:log:211 Error Bitbake)\n')
-                            test_result.update({testcase_id: {'status': '%s' % 
res, 'log': '%s' % log_input}})
+                            
+ test_result.update({self.test_cases_id[test_id]: {'status': '%s' % 
+ res, 'log': '%s' % log_input}})
                         else:
-                            test_result.update({testcase_id: {'status': '%s' % 
res}})
+                            
+ test_result.update({self.test_cases_id[test_id]: {'status': '%s' % 
+ res}})
                 break
             print('Invalid input!')
         return test_result
--
2.7.4

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

Reply via email to