test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/test_result: fix saving result failed
@ 2021-03-31  2:21 Haiyang Zhao
  2021-03-31  2:35 ` Zhao, HaiyangX
  0 siblings, 1 reply; 3+ messages in thread
From: Haiyang Zhao @ 2021-03-31  2:21 UTC (permalink / raw)
  To: dts; +Cc: Haiyang Zhao

when execution.cfg has multiple sections and the drivername is different,
the test result of the second drivername will not be recorded, fix it
by adding judgement.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/test_result.py | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/framework/test_result.py b/framework/test_result.py
index 6dd94451..77fe8f00 100644
--- a/framework/test_result.py
+++ b/framework/test_result.py
@@ -169,12 +169,20 @@ class Result(object):
         except:
             return ''
 
-    def __set_driver(self, package):
-        if package not in self.internals[self.__dut + 1]:
-            self.internals[self.__dut + 1].append(package)
+    def __set_driver(self, driver):
+        if driver not in self.internals[self.__dut + 1]:
+            driver_current = self.__get_driver()
+            if driver_current:
+                if driver not in driver_current:
+                    self.internals[self.__dut + 1][3] = driver_current + '/' + driver
+            else:
+                self.internals[self.__dut + 1].append(driver)
 
     def __get_driver(self):
-        return self.internals[self.__dut + 1][3]
+        try:
+            return self.internals[self.__dut + 1][3]
+        except:
+            return ''
 
     def __current_targets(self):
         return self.internals[self.__dut + 1]
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-31  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31  2:21 [dts] [PATCH V1] framework/test_result: fix saving result failed Haiyang Zhao
2021-03-31  2:35 ` Zhao, HaiyangX
2021-03-31  7:00   ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).