Report: Sort tests in tables 60/25260/5
authorTibor Frank <tifrank@cisco.com>
Wed, 19 Feb 2020 05:53:42 +0000 (06:53 +0100)
committerTibor Frank <tifrank@cisco.com>
Wed, 19 Feb 2020 07:04:54 +0000 (08:04 +0100)
Change-Id: I862a35270a72d66d7cc3c0eaf5fb2bff20dcac7d
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_tables.py
resources/tools/presentation/specification.yaml

index cb9df96..0d52ce1 100644 (file)
@@ -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)
index 03403ff..ed0ad85 100644 (file)
   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"
 #  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"
 #  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"
 #  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"
   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"
   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"
   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"
 #    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"
 #    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"
 #    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"
 #    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"