diff options
author | 2016-11-20 14:19:31 +0200 | |
---|---|---|
committer | 2016-11-20 14:19:31 +0200 | |
commit | 504b0f99511f818e40580a803112999c4bf3984a (patch) | |
tree | 40c529f336ad35ba487772570ee37eef44fb5d13 /scripts/automation/regression | |
parent | 2766ec017d253091c3485bb57d342ac34b06faf5 (diff) |
regression - aggregate_results fixes #2
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/regression')
-rwxr-xr-x | scripts/automation/regression/aggregate_results.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/automation/regression/aggregate_results.py b/scripts/automation/regression/aggregate_results.py index 35c4b4e5..130e0545 100755 --- a/scripts/automation/regression/aggregate_results.py +++ b/scripts/automation/regression/aggregate_results.py @@ -262,6 +262,7 @@ if __name__ == '__main__': scenario = os.environ.get('SCENARIO') build_url = os.environ.get('BUILD_URL') 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') python_ver = os.environ.get('PYTHON_VER') if not scenario: @@ -293,11 +294,11 @@ if __name__ == '__main__': if last_commit_info_file and os.path.exists(last_commit_info_file): with open(last_commit_info_file) as f: trex_last_commit_info = f.read().strip().replace('\n', '<br>\n') - elif trex_last_commit_hash: + elif trex_last_commit_hash and trex_repo: try: command = 'git show %s -s' % trex_last_commit_hash print('Executing: %s' % command) - proc = subprocess.Popen(shlex.split(command), stdout = subprocess.PIPE, stderr = subprocess.STDOUT) + proc = subprocess.Popen(shlex.split(command), stdout = subprocess.PIPE, stderr = subprocess.STDOUT, cwd = trex_repo) (stdout, stderr) = proc.communicate() stdout = stdout.decode('utf-8', errors = 'replace') print('Stdout:\n\t' + stdout.replace('\n', '\n\t')) |