diff options
author | Tibor Frank <tifrank@cisco.com> | 2020-02-19 06:53:42 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2020-02-19 08:04:54 +0100 |
commit | a4e15f5d5ab4bf94fd40deca12bf9a1787535ab3 (patch) | |
tree | 3dea029fc3ca78dfd27e7773ee325d49b10aa05f /resources/tools | |
parent | b51708f0ad28301b87bd66d31713d436f4b9cce2 (diff) |
Report: Sort tests in tables
Change-Id: I862a35270a72d66d7cc3c0eaf5fb2bff20dcac7d
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r-- | resources/tools/presentation/generator_tables.py | 22 | ||||
-rw-r--r-- | resources/tools/presentation/specification.yaml | 22 |
2 files changed, 27 insertions, 17 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index cb9df963cc..0d52ce1616 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -96,7 +96,14 @@ def table_oper_data_html(table, input_data): if data.empty: return data = input_data.merge_data(data) - data.sort_index(inplace=True) + + sort_tests = table.get(u"sort", None) + if sort_tests and sort_tests in (u"ascending", u"descending"): + args = dict( + inplace=True, + ascending=True if sort_tests == u"ascending" else False + ) + data.sort_index(**args) suites = input_data.filter_data( table, @@ -284,12 +291,15 @@ def table_merged_details(table, input_data): ) data = input_data.filter_data(table, continue_on_error=True) data = input_data.merge_data(data) - data.sort_index(inplace=True) - logging.info( - f" Creating the data set for the {table.get(u'type', u'')} " - f"{table.get(u'title', u'')}." - ) + sort_tests = table.get(u"sort", None) + if sort_tests and sort_tests in (u"ascending", u"descending"): + args = dict( + inplace=True, + ascending=True if sort_tests == u"ascending" else False + ) + data.sort_index(**args) + suites = input_data.filter_data( table, continue_on_error=True, data_set=u"suites") suites = input_data.merge_data(suites) diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index 03403ff316..ed0ad858f1 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -4411,7 +4411,7 @@ algorithm: "table_oper_data_html" output-file: "{DIR[DTO,PERF,VPP,3N,HSW]}/vpp_test_operational_3n_hsw" data: "vpp-perf-results-3n-hsw" - filter: "'NDRPDR'" + filter: "all" ## Test Operational Data - VPP Performance Operational Data 3n-skx #- type: "table" @@ -4419,7 +4419,7 @@ # algorithm: "table_oper_data_html" # output-file: "{DIR[DTO,PERF,VPP,3N,SKX]}/vpp_test_operational_3n_skx" # data: "vpp-perf-results-3n-skx" -# filter: "not 'CFS_OPT'" +# filter: "all" # ## Test Operational Data - VPP Performance Operational Data 2n-skx #- type: "table" @@ -4427,7 +4427,7 @@ # algorithm: "table_oper_data_html" # output-file: "{DIR[DTO,PERF,VPP,2N,SKX]}/vpp_test_operational_2n_skx" # data: "vpp-perf-results-2n-skx" -# filter: "not 'CFS_OPT'" +# filter: "all" ## Test Operational Data - VPP Performance Operational Data 2n-clx #- type: "table" @@ -4435,7 +4435,7 @@ # algorithm: "table_oper_data_html" # output-file: "{DIR[DTO,PERF,VPP,2N,CLX]}/vpp_test_operational_2n_clx" # data: "vpp-perf-results-2n-clx" -# filter: "not 'CFS_OPT'" +# filter: "all" # Test Operational Data - VPP Performance Operational Data 3n-tsh - type: "table" @@ -4443,7 +4443,7 @@ algorithm: "table_oper_data_html" output-file: "{DIR[DTO,PERF,VPP,3N,TSH]}/vpp_test_operational_3n_tsh" data: "vpp-perf-results-3n-tsh" - filter: "not 'CFS_OPT'" + filter: "all" # Test Operational Data - VPP Performance Operational Data 3n-dnv - type: "table" @@ -4451,7 +4451,7 @@ algorithm: "table_oper_data_html" output-file: "{DIR[DTO,PERF,VPP,3N,DNV]}/vpp_test_operational_3n_dnv" data: "vpp-perf-results-3n-dnv" - filter: "'NDRPDR'" + filter: "all" # Test Operational Data - VPP Performance Operational Data 2n-dnv - type: "table" @@ -4459,7 +4459,7 @@ algorithm: "table_oper_data_html" output-file: "{DIR[DTO,PERF,VPP,2N,DNV]}/vpp_test_operational_2n_dnv" data: "vpp-perf-results-2n-dnv" - filter: "'NDRPDR'" + filter: "all" # Detailed Test Results - VPP MRR Results 3n-hsw - type: "table" @@ -5051,7 +5051,7 @@ # data: "dpdk-compare-testbeds-skx-clx-cmp" # data: "dpdk-compare-testbeds-skx-clx" # include-tests: "NDR" # "PDR" | "NDR" | "MRR" -# filter: "'NDRPDR'" +# filter: "all" # parameters: # - "name" # - "parent" @@ -5070,7 +5070,7 @@ # data: "dpdk-compare-testbeds-skx-clx-cmp" # data: "dpdk-compare-testbeds-skx-clx" # include-tests: "PDR" # "PDR" | "NDR" | "MRR" -# filter: "'NDRPDR'" +# filter: "all" # parameters: # - "name" # - "parent" @@ -5089,7 +5089,7 @@ # data: "dpdk-compare-topologies-cmp" # data: "dpdk-compare-topologies" # include-tests: "NDR" # "PDR" | "NDR" | "MRR" -# filter: "'NDRPDR'" # "('NDRPDR' or 'NDRPDRDISC')" | "'MRR'" +# filter: "all" # parameters: # - "name" # - "parent" @@ -5108,7 +5108,7 @@ # data: "dpdk-compare-topologies-cmp" # data: "dpdk-compare-topologies" # include-tests: "PDR" # "PDR" | "NDR" | "MRR" -# filter: "'NDRPDR'" # "('NDRPDR' or 'NDRPDRDISC')" | "'MRR'" +# filter: "all" # parameters: # - "name" # - "parent" |