aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_cpta.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-09-27 13:02:24 +0200
committerTibor Frank <tifrank@cisco.com>2019-12-04 12:43:54 +0000
commitba15109cf5b9972be50821ef500e8a637cdac4f9 (patch)
tree775faf6e813d31f99ecb60a57355ba8d6631af45 /resources/tools/presentation/generator_cpta.py
parent8d53403c45f76478ae9b5e458b2ffc718f85676b (diff)
Trending: Reorganization
+ use selection of tests by their full names + finalize trending_test_groups.md + modify static content + modify anchors + specifications: + container memif + ip4 + ip4 tunnels + ip6 + ipsec + l2 + srv6 + vhost + vts + dpdk + add 2n-clx + hyperlinks Change-Id: Ibe073330317539896c6fbfcbd4a7a279b58bdb95 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_cpta.py')
-rw-r--r--resources/tools/presentation/generator_cpta.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/resources/tools/presentation/generator_cpta.py b/resources/tools/presentation/generator_cpta.py
index 3003557696..f63caa40af 100644
--- a/resources/tools/presentation/generator_cpta.py
+++ b/resources/tools/presentation/generator_cpta.py
@@ -353,8 +353,15 @@ def _generate_all_charts(spec, input_data):
f"{graph.get(u'title', u'')}."
)
)
- data = input_data.filter_data(graph, continue_on_error=True)
- if data is None:
+
+ if graph.get(u"include", None):
+ data = input_data.filter_tests_by_name(
+ graph, continue_on_error=True
+ )
+ else:
+ data = input_data.filter_data(graph, continue_on_error=True)
+
+ if data is None or data.empty:
logging.error(u"No data.")
return dict()
@@ -496,7 +503,7 @@ def _generate_all_charts(spec, input_data):
])
name_file = (
- f"{spec.cpta[u'output-file']}-{graph[u'output-file-name']}"
+ f"{spec.cpta[u'output-file']}/{graph[u'output-file-name']}"
f"{spec.cpta[u'output-file-type']}")
logs.append((u"INFO", f" Writing the file {name_file} ..."))
@@ -611,7 +618,7 @@ def _generate_all_charts(spec, input_data):
result = u"PASS"
for job_name, job_data in anomaly_classifications.items():
file_name = \
- f"{spec.cpta[u'output-file']}-regressions-{job_name}.txt"
+ f"{spec.cpta[u'output-file']}/regressions-{job_name}.txt"
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"regression":
@@ -619,7 +626,7 @@ def _generate_all_charts(spec, input_data):
if classification in (u"regression", u"outlier"):
result = u"FAIL"
file_name = \
- f"{spec.cpta[u'output-file']}-progressions-{job_name}.txt"
+ f"{spec.cpta[u'output-file']}/progressions-{job_name}.txt"
with open(file_name, u'w') as txt_file:
for test_name, classification in job_data.items():
if classification == u"progression":