Commit d66b3671 authored by Emily Hanley's avatar Emily Hanley Committed by Commit Bot

Fixing dashboard upload to use benchmark name instead of entire path.

Bug: 757933
Change-Id: Id2f2e6603b92c5e96c685832ea7946fdef338f9f
Reviewed-on: https://chromium-review.googlesource.com/966799Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#543875}
parent 1e6afe6e
...@@ -13,7 +13,7 @@ from core import oauth_api ...@@ -13,7 +13,7 @@ from core import oauth_api
from core import upload_results_to_perf_dashboard from core import upload_results_to_perf_dashboard
from core import results_merger from core import results_merger
from os import listdir from os import listdir
from os.path import isfile, join from os.path import isfile, join, basename
RESULTS_URL = 'https://chromeperf.appspot.com' RESULTS_URL = 'https://chromeperf.appspot.com'
...@@ -100,6 +100,8 @@ def _process_perf_results(output_json, configuration_name, ...@@ -100,6 +100,8 @@ def _process_perf_results(output_json, configuration_name,
try: try:
with oauth_api.with_access_token(service_account_file) as oauth_file: with oauth_api.with_access_token(service_account_file) as oauth_file:
for directory in benchmark_directory_list: for directory in benchmark_directory_list:
# Obtain the test name we are running
benchmark_name = basename(directory)
disabled = False disabled = False
with open(join(directory, 'test_results.json')) as json_data: with open(join(directory, 'test_results.json')) as json_data:
json_results = json.load(json_data) json_results = json.load(json_data)
...@@ -121,11 +123,11 @@ def _process_perf_results(output_json, configuration_name, ...@@ -121,11 +123,11 @@ def _process_perf_results(output_json, configuration_name,
test_results_list.append(json_results) test_results_list.append(json_results)
if disabled: if disabled:
# We don't upload disabled benchmarks # We don't upload disabled benchmarks
print 'Benchmark %s disabled' % directory print 'Benchmark %s disabled' % benchmark_name
continue continue
print 'Uploading perf results from %s benchmark' % directory print 'Uploading perf results from %s benchmark' % benchmark_name
_upload_perf_results(join(directory, 'perf_results.json'), _upload_perf_results(join(directory, 'perf_results.json'),
directory, configuration_name, build_properties, benchmark_name, configuration_name, build_properties,
oauth_file, tmpfile_dir) oauth_file, tmpfile_dir)
_merge_json_output(output_json, test_results_list) _merge_json_output(output_json, test_results_list)
finally: finally:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment