test suite reviews and discussions
 help / color / Atom feed
* [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed
@ 2020-11-13 10:06 Haiyang Zhao
  2020-11-13 10:06 ` [dts] [PATCH V1 1/2] framework/project_dpdk: drop the detailed errors when complie failed Haiyang Zhao
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-13 10:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

when compiling failed by meson, the error msg exceed the maximum length
of xlwt cell, so save result will be failed and DTS will be terminated,
drop the compile error msg and truncate msg length in excel cell to fix it.

Haiyang Zhao (2):
  framework/project_dpdk: drop the detailed errors when complie failed
  framework/excel_reporter: fix issue of msg exceed xlwt maximum cell
    length

 framework/excel_reporter.py | 6 +++---
 framework/project_dpdk.py   | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.17.1


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

* [dts] [PATCH V1 1/2] framework/project_dpdk: drop the detailed errors when complie failed
  2020-11-13 10:06 [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Haiyang Zhao
@ 2020-11-13 10:06 ` Haiyang Zhao
  2020-11-13 10:06 ` [dts] [PATCH V1 2/2] framework/excel_reporter: fix issue of msg exceed xlwt maximum cell length Haiyang Zhao
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-13 10:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

the detailed compiled info is too long and will be saved
into log file, so there's no need to throw it in assert exception.

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

diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py
index a41b3df..fbbc78d 100644
--- a/framework/project_dpdk.py
+++ b/framework/project_dpdk.py
@@ -314,7 +314,7 @@ class DPDKdut(Dut):
         assert ("FAILED" not in out), "meson setup failed ..."
 
         out = self.send_expect("ninja -C %s -j %d" % (target, self.number_of_cores), "# ", build_time)
-        assert ("FAILED" not in out), "ninja complie failed ...\r\n %s" % out
+        assert ("FAILED" not in out), "ninja complie failed ..."
 
         # copy kmod file to the folder same as make
         out = self.send_expect("find ./%s/kernel/ -name *.ko" % target, "# ", verify=True)
@@ -555,9 +555,9 @@ class DPDKdut(Dut):
         else:
             example = '/'.join(folder_info[folder_info.index('examples')+1:])
         out = self.send_expect("meson configure -Dexamples=%s %s" % (example, self.target), "# ")
-        assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
+        assert ("FAILED" not in out), "Compilation error..."
         out = self.send_expect("ninja -C %s" % self.target, "# ", timeout)
-        assert ("FAILED" not in out), "Compilation error... \r\n %s" % out
+        assert ("FAILED" not in out), "Compilation error..."
 
         # verify the app build in the config path
         if example != 'all':
-- 
2.17.1


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

* [dts] [PATCH V1 2/2] framework/excel_reporter: fix issue of msg exceed xlwt maximum cell length
  2020-11-13 10:06 [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Haiyang Zhao
  2020-11-13 10:06 ` [dts] [PATCH V1 1/2] framework/project_dpdk: drop the detailed errors when complie failed Haiyang Zhao
@ 2020-11-13 10:06 ` Haiyang Zhao
  2020-11-13 10:18 ` [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Zhao, HaiyangX
  2020-11-18  3:26 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Haiyang Zhao @ 2020-11-13 10:06 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Haiyang Zhao

truncate msg length if it exceed xlwt maximun cell
legth in case of saving result failed and DTS terminated.

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

diff --git a/framework/excel_reporter.py b/framework/excel_reporter.py
index 5b8e4cf..65d26b6 100644
--- a/framework/excel_reporter.py
+++ b/framework/excel_reporter.py
@@ -167,7 +167,7 @@ class ExcelReporter(object):
                 self.sheet.write(self.row, self.col + 1, result)
             else:
                 self.sheet.write(
-                    self.row, self.col + 1, result, self.failed_style)
+                    self.row, self.col + 1, result if len(result) < 5000 else result[:2000] + '\r\n...\r\n...\r\n...\r\n' + result[-2000:], self.failed_style)
 
     def __write_cases(self, dut, target, suite):
         for case in set(self.result.all_test_cases(dut, target, suite)):
@@ -198,7 +198,7 @@ class ExcelReporter(object):
 
     def __write_failed_target(self, dut, target):
         msg = "TARGET ERROR '%s'" % self.result.target_failed_msg(dut, target)
-        self.sheet.write(self.row, self.col + 4, msg, self.failed_style)
+        self.sheet.write(self.row, self.col + 4, msg if len(msg) < 5000 else msg[:2000] + '\r\n...\r\n...\r\n...\r\n' + msg[-2000:], self.failed_style)
         self.row += 1
 
     def __write_targets(self, dut):
@@ -214,7 +214,7 @@ class ExcelReporter(object):
 
     def __write_failed_dut(self, dut):
         msg = "PREREQ FAILED '%s'" % self.result.dut_failed_msg(dut)
-        self.sheet.write(self.row, self.col + 5, msg, self.failed_style)
+        self.sheet.write(self.row, self.col + 5, msg if len(msg) < 5000 else msg[:2000] + '\r\n...\r\n...\r\n...\r\n' + msg[-2000:], self.failed_style)
         self.row += 1
 
     def __parse_result(self):
-- 
2.17.1


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

* Re: [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed
  2020-11-13 10:06 [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Haiyang Zhao
  2020-11-13 10:06 ` [dts] [PATCH V1 1/2] framework/project_dpdk: drop the detailed errors when complie failed Haiyang Zhao
  2020-11-13 10:06 ` [dts] [PATCH V1 2/2] framework/excel_reporter: fix issue of msg exceed xlwt maximum cell length Haiyang Zhao
@ 2020-11-13 10:18 ` Zhao, HaiyangX
  2020-11-18  3:26 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Zhao, HaiyangX @ 2020-11-13 10:18 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts, Tu, Lijuan

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

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

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Friday, November 13, 2020 18:06
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1 0/2] framework: fix error msg too long cause saving
> result failed


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

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

* Re: [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed
  2020-11-13 10:06 [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Haiyang Zhao
                   ` (2 preceding siblings ...)
  2020-11-13 10:18 ` [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Zhao, HaiyangX
@ 2020-11-18  3:26 ` Tu, Lijuan
  3 siblings, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-11-18  3:26 UTC (permalink / raw)
  To: Zhao, HaiyangX, dts; +Cc: Zhao, HaiyangX

> 
> when compiling failed by meson, the error msg exceed the maximum length
> of xlwt cell, so save result will be failed and DTS will be terminated, drop the
> compile error msg and truncate msg length in excel cell to fix it.
> 
> Haiyang Zhao (2):
>   framework/project_dpdk: drop the detailed errors when complie failed
>   framework/excel_reporter: fix issue of msg exceed xlwt maximum cell
>     length

Applied


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 10:06 [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Haiyang Zhao
2020-11-13 10:06 ` [dts] [PATCH V1 1/2] framework/project_dpdk: drop the detailed errors when complie failed Haiyang Zhao
2020-11-13 10:06 ` [dts] [PATCH V1 2/2] framework/excel_reporter: fix issue of msg exceed xlwt maximum cell length Haiyang Zhao
2020-11-13 10:18 ` [dts] [PATCH V1 0/2] framework: fix error msg too long cause saving result failed Zhao, HaiyangX
2020-11-18  3:26 ` Tu, Lijuan

test suite reviews and discussions

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


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