From d10c83488ecc30f5b870e36c2b7c9a9449eac6aa Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Thu, 27 Feb 2020 11:47:55 +0100 Subject: [PATCH] Report: Do not show failed tests in "Detailed Test Results" Change-Id: I6019af7f0b2af29c876a39a3243fe29843e3b1da Signed-off-by: Tibor Frank --- .../vpp_performance_results/index.rst | 2 +- .../vpp_performance_configuration/index.rst | 2 +- .../vpp_performance_operational_data/index.rst | 2 +- resources/tools/presentation/generator_files.py | 12 ++++---- resources/tools/presentation/generator_tables.py | 35 +++++++++++++++------- resources/tools/presentation/specification.yaml | 6 ++-- 6 files changed, 39 insertions(+), 20 deletions(-) diff --git a/docs/report/detailed_test_results/vpp_performance_results/index.rst b/docs/report/detailed_test_results/vpp_performance_results/index.rst index b6cdd64a29..0459da69ab 100644 --- a/docs/report/detailed_test_results/vpp_performance_results/index.rst +++ b/docs/report/detailed_test_results/vpp_performance_results/index.rst @@ -7,8 +7,8 @@ VPP Throughput ../vpp_performance_results_3n_tsh/index ../vpp_performance_results_2n_dnv/index ../vpp_performance_results_3n_dnv/index + ../vpp_performance_results_2n_clx/index .. - ../vpp_performance_results_2n_clx/index ../vpp_performance_results_2n_skx/index ../vpp_performance_results_3n_skx/index diff --git a/docs/report/test_configuration/vpp_performance_configuration/index.rst b/docs/report/test_configuration/vpp_performance_configuration/index.rst index 7085c8951d..7b4b9ab460 100644 --- a/docs/report/test_configuration/vpp_performance_configuration/index.rst +++ b/docs/report/test_configuration/vpp_performance_configuration/index.rst @@ -7,8 +7,8 @@ VPP Throughput ../vpp_performance_configuration_3n_tsh/index ../vpp_performance_configuration_2n_dnv/index ../vpp_performance_configuration_3n_dnv/index + ../vpp_performance_configuration_2n_clx/index .. - ../vpp_performance_configuration_2n_clx/index ../vpp_performance_configuration_2n_skx/index ../vpp_performance_configuration_3n_skx/index diff --git a/docs/report/test_operational_data/vpp_performance_operational_data/index.rst b/docs/report/test_operational_data/vpp_performance_operational_data/index.rst index e1c4748529..7eca0de3b6 100644 --- a/docs/report/test_operational_data/vpp_performance_operational_data/index.rst +++ b/docs/report/test_operational_data/vpp_performance_operational_data/index.rst @@ -7,8 +7,8 @@ VPP Throughput ../vpp_performance_operational_data_3n_tsh/index ../vpp_performance_operational_data_2n_dnv/index ../vpp_performance_operational_data_3n_dnv/index + ../vpp_performance_operational_data_2n_clx/index .. - ../vpp_performance_operational_data_2n_clx/index ../vpp_performance_operational_data_2n_skx/index ../vpp_performance_operational_data_3n_skx/index diff --git a/resources/tools/presentation/generator_files.py b/resources/tools/presentation/generator_files.py index e1ddef013d..ec142eded4 100644 --- a/resources/tools/presentation/generator_files.py +++ b/resources/tools/presentation/generator_files.py @@ -123,7 +123,6 @@ def file_test_results(file_spec, input_data, frmt=u"rst"): if tests.empty: return tests = input_data.merge_data(tests) - tests.sort_index(inplace=True) suites = input_data.filter_data( file_spec, @@ -162,12 +161,14 @@ def file_test_results(file_spec, input_data, frmt=u"rst"): file_handler.write(f"\n{suite[u'name']}\n{title_line}\n") if _tests_in_suite(suite[u"name"], tests): - file_handler.write(f"\n{suite[u'name']}\n{title_line}\n") - file_handler.write( - f"\n{suite[u'doc']}\n".replace(u'|br|', u'\n\n -') - ) for tbl_file in table_lst: if suite[u"name"] in tbl_file: + file_handler.write( + f"\n{suite[u'name']}\n{title_line}\n" + ) + file_handler.write( + f"\n{suite[u'doc']}\n".replace(u'|br|', u'\n\n -') + ) if frmt == u"html": file_handler.write( f"\n.. include:: {tbl_file.split(u'/')[-1]}\n" @@ -178,6 +179,7 @@ def file_test_results(file_spec, input_data, frmt=u"rst"): file_latex=tbl_file, file_html=tbl_file.split(u"/")[-1]) ) + break logging.info(u" Done.") diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 9e7ada640f..7a7db5d59f 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -151,6 +151,17 @@ def table_oper_data_html(table, input_data): trow, u"td", attrib=dict(align=u"left", colspan=u"6") ) tcol.text = u"No Data" + + trow = ET.SubElement( + tbl, u"tr", attrib=dict(bgcolor=colors[u"empty"]) + ) + thead = ET.SubElement( + trow, u"th", attrib=dict(align=u"left", colspan=u"6") + ) + font = ET.SubElement( + thead, u"font", attrib=dict(size=u"12px", color=u"#ffffff") + ) + font.text = u"." return str(ET.tostring(tbl, encoding=u"unicode")) tbl_hdr = ( @@ -172,15 +183,15 @@ def table_oper_data_html(table, input_data): if dut_data.get(u"threads", None) is None: tcol.text = u"No Data" continue - bold = ET.SubElement(tcol, u"b") - bold.text = dut_name - - trow = ET.SubElement( - tbl, u"tr", attrib=dict(bgcolor=colors[u"body"][0]) - ) - tcol = ET.SubElement( - trow, u"td", attrib=dict(align=u"left", colspan=u"6") - ) + # bold = ET.SubElement(tcol, u"b") + # bold.text = dut_name + # + # trow = ET.SubElement( + # tbl, u"tr", attrib=dict(bgcolor=colors[u"body"][0]) + # ) + # tcol = ET.SubElement( + # trow, u"td", attrib=dict(align=u"left", colspan=u"6") + # ) bold = ET.SubElement(tcol, u"b") bold.text = ( f"Host IP: {dut_data.get(u'host', '')}, " @@ -323,6 +334,9 @@ def table_merged_details(table, input_data): try: col_data = str(data[test][column[ u"data"].split(u" ")[1]]).replace(u'"', u'""') + # Do not include tests with "Test Failed" in test message + if u"Test Failed" in col_data: + continue col_data = col_data.replace( u"No Data", u"Not Captured " ) @@ -343,7 +357,8 @@ def table_merged_details(table, input_data): row_lst.append(f'"{col_data}"') except KeyError: row_lst.append(u'"Not captured"') - table_lst.append(row_lst) + if len(row_lst) == len(table[u"columns"]): + table_lst.append(row_lst) # Write the data to file if table_lst: diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index ef19a02b86..5cbd146c25 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -589,6 +589,7 @@ - 77 # NDRPDR full - 78 # NDRPDR full - 79 # NDRPDR full + - 82 # NDRPDR full vpp-perf-results-3n-skx: # TODO: Replace @@ -2112,6 +2113,7 @@ - 77 # NDRPDR full - 78 # NDRPDR full - 79 # NDRPDR full + - 82 # NDRPDR full # csit-vpp-perf-verify-1904-3n-skx: # - 7 # MRR sel @@ -2506,8 +2508,8 @@ format: html: - full - pdf: - - minimal +# pdf: +# - minimal ################################################################################ ### T A B L E S ### -- 2.16.6