Commit 89b1e152 authored by eyaich's avatar eyaich Committed by Commit bot

Ignoring all results but chartjson on disabled benchmark run.

Currently we are writing out only chartjson results when a disabled
test is run but we still check for json results.

BUG=chromium:647714

Review-Url: https://codereview.chromium.org/2385183002
Cr-Commit-Position: refs/heads/master@{#422630}
parent 30abb79a
...@@ -71,20 +71,25 @@ def main(): ...@@ -71,20 +71,25 @@ def main():
'--output-dir', tempfile_dir, '--output-dir', tempfile_dir,
'--output-format=json' '--output-format=json'
], env=env) ], env=env)
tempfile_name = os.path.join(tempfile_dir, 'results.json') # If we have also output chartjson read it in and return it.
with open(tempfile_name) as f:
results = json.load(f)
for value in results['per_page_values']:
if value['type'] == 'failure':
failures.append(results['pages'][str(value['page_id'])]['name'])
valid = bool(rc == 0 or failures)
# If we have also output chartjson read it in and return it.
# results-chart.json is the file name output by telemetry when the # results-chart.json is the file name output by telemetry when the
# chartjson output format is included # chartjson output format is included
if chartjson_results_present: if chartjson_results_present:
chart_tempfile_name = os.path.join(tempfile_dir, 'results-chart.json') chart_tempfile_name = os.path.join(tempfile_dir, 'results-chart.json')
with open(chart_tempfile_name) as f: with open(chart_tempfile_name) as f:
chartresults = json.load(f) chartresults = json.load(f)
# We need to get chartjson results first as this may be a disabled
# benchmark that was run
if (not chartjson_results_present or
(chartjson_results_present and chartresults.get('enabled', True))):
tempfile_name = os.path.join(tempfile_dir, 'results.json')
with open(tempfile_name) as f:
results = json.load(f)
for value in results['per_page_values']:
if value['type'] == 'failure':
failures.append(results['pages'][str(value['page_id'])]['name'])
valid = bool(rc == 0 or failures)
except Exception: except Exception:
traceback.print_exc() traceback.print_exc()
valid = False valid = False
......
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