test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1] framework/test_result: fix saving result failed
Date: Wed, 31 Mar 2021 10:21:36 +0800	[thread overview]
Message-ID: <20210331022136.21576-1-haiyangx.zhao@intel.com> (raw)

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


             reply	other threads:[~2021-03-31  2:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31  2:21 Haiyang Zhao [this message]
2021-03-31  2:35 ` Zhao, HaiyangX
2021-03-31  7:00   ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210331022136.21576-1-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).