aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_alerts.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-10-04 10:41:00 +0200
committerTibor Frank <tifrank@cisco.com>2019-10-07 15:04:27 +0000
commit0f496f4c337d06032618e861ed6dfb8b51fc2a9f (patch)
treefd167bf297ad0a5525137ad4909f40398fcf70b2 /resources/tools/presentation/generator_alerts.py
parentf6a8c61f15deb7906d2caae10fea702235123954 (diff)
Trending: Send alerts when regression occurs
Change-Id: I45d218ea323245199ad5093bd64c6a9bd862cad9 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_alerts.py')
-rw-r--r--resources/tools/presentation/generator_alerts.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/resources/tools/presentation/generator_alerts.py b/resources/tools/presentation/generator_alerts.py
index ed4318b3a6..2c2b70dc06 100644
--- a/resources/tools/presentation/generator_alerts.py
+++ b/resources/tools/presentation/generator_alerts.py
@@ -362,10 +362,23 @@ class Alerting(object):
cores=params["cores"] +
" " * (max_len_cores - len(params["cores"])))
+ # Add list of regressions:
+ file_name = "{0}/cpta-regressions-{1}.txt".\
+ format(config["output-dir"],
+ alert["urls"][idx].split('/')[-1])
+ try:
+ with open(file_name, 'r') as txt_file:
+ file_content = txt_file.read()
+ if file_content:
+ text += "\nRegressions (full paths):\n\n"
+ text += file_content
+ except IOError:
+ pass
+
text += "\nFor detailed information visit: {url}\n".\
format(url=alert["url-details"])
file_name = "{0}/{1}".format(config["output-dir"],
- config["output-file"])
+ config["output-file"])
logging.info("Writing the file '{0}.txt' ...".format(file_name))
try: