Chromium Code Reviews| Index: scripts/slave/runtest.py |
| diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py |
| index a4f633acd21c4e6cf804ada708651788280bc1c3..dadf1eb791e606746ef65cf6b0a1e33e757fd9e8 100755 |
| --- a/scripts/slave/runtest.py |
| +++ b/scripts/slave/runtest.py |
| @@ -677,9 +677,9 @@ def _WriteChartJsonToOutput(chartjson_file, log_processor, args): |
| assert log_processor.IsChartJson() |
| chartjson_data = _GenerateDashboardJson(log_processor, args) |
| - |
| - with open(chartjson_file, 'w') as f: |
| - json.dump(chartjson_data, f) |
| + if chartjson_data: |
| + with open(chartjson_file, 'w') as f: |
| + json.dump(chartjson_data[1], f) |
| def _SendResultsToDashboard(log_processor, args): |
| @@ -700,11 +700,18 @@ def _SendResultsToDashboard(log_processor, args): |
| results = None |
| if log_processor.IsChartJson(): |
| - results = _GenerateDashboardJson(log_processor, args) |
| - if not results: |
| + chartjson_results = _GenerateDashboardJson(log_processor, args) |
| + if not chartjson_results: |
| print 'Error: No json output from telemetry.' |
| print '@@@STEP_FAILURE@@@' |
| log_processor.Cleanup() |
| + if not chartjson_results: |
| + return False |
| + if chartjson_results[0]: |
| + # This benchmark was disabled so don't send results to the dashboard |
| + # but it was a successful run. |
| + return True |
| + results = chartjson_results[1] |
| else: |
| charts = _GetDataFromLogProcessor(log_processor) |
| results = results_dashboard.MakeListOfPoints( |
| @@ -715,7 +722,8 @@ def _SendResultsToDashboard(log_processor, args): |
| return False |
| logging.debug(json.dumps(results, indent=2)) |
| - return results_dashboard.SendResults(results, args['url'], args['build_dir']) |
| + return results_dashboard.SendResults( |
| + results, args['url'], args['build_dir']) |
|
perezju
2016/09/22 08:50:27
nit: two extra indent spaces
eyaich1
2016/09/26 15:22:11
Done.
|
| def _GetDataFromLogProcessor(log_processor): |