test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] framework/test_result: optmize saving result
@ 2021-04-15  8:11 Haiyang Zhao
  2021-04-15  8:24 ` Zhao, HaiyangX
  0 siblings, 1 reply; 3+ messages in thread
From: Haiyang Zhao @ 2021-04-15  8:11 UTC (permalink / raw)
  To: dts; +Cc: Haiyang Zhao

when test configuration changed during the test, saving result will be failed.
add judgement for all the configurations to improve DTS robustness.

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

diff --git a/framework/test_result.py b/framework/test_result.py
index 77fe8f00..a718034d 100644
--- a/framework/test_result.py
+++ b/framework/test_result.py
@@ -103,10 +103,18 @@ class Result(object):
 
     def __set_dpdk_version(self, dpdk_version):
         if dpdk_version not in self.internals[self.__dut + 1]:
-            self.internals[self.__dut + 1].append(dpdk_version)
+            dpdk_current = self.__get_dpdk_version()
+            if dpdk_current:
+                if dpdk_version not in dpdk_current:
+                    self.internals[self.__dut + 1][4] = dpdk_current + '/' + dpdk_version
+            else:
+                self.internals[self.__dut + 1].append(dpdk_version)
 
     def __get_dpdk_version(self):
-        return self.internals[self.__dut + 1][3]
+        try:
+            return self.internals[self.__dut + 1][4]
+        except:
+            return ''
 
     def current_kdriver(self, dut):
         """
@@ -120,10 +128,18 @@ class Result(object):
 
     def __set_kdriver(self, driver):
         if not self.internals[self.__dut + 1]:
-            self.internals[self.__dut + 1].append(driver)
+            kdriver_current = self.__get_kdriver()
+            if kdriver_current:
+                if driver not in kdriver_current:
+                    self.internals[self.__dut + 1][0] = kdriver_current + '/' + driver
+            else:
+                self.internals[self.__dut + 1].append(driver)
 
     def __get_kdriver(self):
-        return self.internals[self.__dut + 1][0]
+        try:
+            return self.internals[self.__dut + 1][0]
+        except:
+            return ''
 
     def current_firmware_version(self, dut):
         """
@@ -137,10 +153,18 @@ class Result(object):
 
     def __set_firmware(self, firmware):
         if firmware not in self.internals[self.__dut + 1]:
-            self.internals[self.__dut + 1].append(firmware)
+            firmware_current = self.__get_firmware()
+            if firmware_current:
+                if firmware not in firmware_current:
+                    self.internals[self.__dut + 1][1] = firmware_current + '/' + firmware
+            else:
+                self.internals[self.__dut + 1].append(firmware)
 
     def __get_firmware(self):
-        return self.internals[self.__dut + 1][1]
+        try:
+            return self.internals[self.__dut + 1][1]
+        except:
+            return ''
 
     def current_package_version(self, dut):
         """
@@ -154,10 +178,18 @@ class Result(object):
 
     def __set_ddp_package(self, package):
         if package not in self.internals[self.__dut + 1]:
-            self.internals[self.__dut + 1].append(package)
+            pkg_current = self.__get_ddp_package()
+            if pkg_current != '':
+                if pkg_current and package not in pkg_current:
+                    self.internals[self.__dut + 1][2] = pkg_current + '/' + package
+            else:
+                self.internals[self.__dut + 1].append(package)
 
     def __get_ddp_package(self):
-        return self.internals[self.__dut + 1][2]
+        try:
+            return self.internals[self.__dut + 1][2]
+        except:
+            return ''
 
     def current_driver(self, dut):
         """
-- 
2.17.1


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

* Re: [dts] [PATCH V1] framework/test_result: optmize saving result
  2021-04-15  8:11 [dts] [PATCH V1] framework/test_result: optmize saving result Haiyang Zhao
@ 2021-04-15  8:24 ` Zhao, HaiyangX
  2021-05-07  6:40   ` Tu, Lijuan
  0 siblings, 1 reply; 3+ messages in thread
From: Zhao, HaiyangX @ 2021-04-15  8:24 UTC (permalink / raw)
  To: dts

[-- Attachment #1: Type: text/plain, Size: 318 bytes --]



> -----Original Message-----
> From: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Sent: Thursday, April 15, 2021 16:11
> To: dts@dpdk.org
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1] framework/test_result: optmize saving result

Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>

[-- Attachment #2: TestUnitTestsCmdline.log --]
[-- Type: application/octet-stream, Size: 2377 bytes --]

[-- Attachment #3: TestUnitTestsCrc.log --]
[-- Type: application/octet-stream, Size: 41437 bytes --]

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

* Re: [dts] [PATCH V1] framework/test_result: optmize saving result
  2021-04-15  8:24 ` Zhao, HaiyangX
@ 2021-05-07  6:40   ` Tu, Lijuan
  0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2021-05-07  6:40 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts



> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhao, HaiyangX
> Sent: 2021年4月15日 16:25
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] framework/test_result: optmize saving result
> 
> 
> 
> > -----Original Message-----
> > From: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> > Sent: Thursday, April 15, 2021 16:11
> > To: dts@dpdk.org
> > Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> > Subject: [dts][PATCH V1] framework/test_result: optmize saving result
> 
> Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Applied

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

end of thread, other threads:[~2021-05-07  6:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15  8:11 [dts] [PATCH V1] framework/test_result: optmize saving result Haiyang Zhao
2021-04-15  8:24 ` Zhao, HaiyangX
2021-05-07  6:40   ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git