summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-02-16 15:13:34 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-16 15:13:34 +0200
commit8ed3bb7219e4548031d3e07d929d9d5e1f6840af (patch)
tree22962922e0ed87f1217a6456f1afaff663ca285f /scripts/automation/regression
parentb4e85e57cf825684acd24ff1bd54f3512f4aad6f (diff)
Add branch name to title of mails (Side branch scenario)
Change-Id: Ia32b9172aaa74d1720b496830eee8c744866f28b Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/regression')
-rwxr-xr-xscripts/automation/regression/aggregate_results.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/automation/regression/aggregate_results.py b/scripts/automation/regression/aggregate_results.py
index 130e0545..05bb001e 100755
--- a/scripts/automation/regression/aggregate_results.py
+++ b/scripts/automation/regression/aggregate_results.py
@@ -264,6 +264,7 @@ if __name__ == '__main__':
build_id = os.environ.get('BUILD_ID')
trex_repo = os.environ.get('TREX_CORE_REPO')
last_commit_info_file = os.environ.get('LAST_COMMIT_INFO')
+ last_commit_branch_file = os.environ.get('LAST_COMMIT_BRANCH')
python_ver = os.environ.get('PYTHON_VER')
if not scenario:
print('Warning: no environment variable SCENARIO, using default')
@@ -289,6 +290,11 @@ if __name__ == '__main__':
trex_info_dict[key_value[0].strip()] = key_value[1].strip()
break
+ branch_name = ''
+ if last_commit_branch_file and os.path.exists(last_commit_branch_file):
+ with open(last_commit_branch_file) as f:
+ branch_name = f.read().strip()
+
trex_last_commit_info = ''
trex_last_commit_hash = trex_info_dict.get('Git SHA')
if last_commit_info_file and os.path.exists(last_commit_info_file):
@@ -661,6 +667,8 @@ if __name__ == '__main__':
# mail title
mailtitle_output = scenario.capitalize()
+ if branch_name:
+ mailtitle_output += ' (%s)' % branch_name
if build_id:
mailtitle_output += ' - Build #%s' % build_id
mailtitle_output += ' - %s!' % current_status