Chromium Code Reviews| Index: scripts/slave/runtest.py |
| diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py |
| index a4f633acd21c4e6cf804ada708651788280bc1c3..9afdbbc21b8a2b259c6a94c10ac701d5249992fa 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, f) |
| def _SendResultsToDashboard(log_processor, args): |
| @@ -700,11 +700,19 @@ 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['chart_data'].get('enabled', True): |
| + results = chartjson_results |
| + else: |
| + # This benchmark was disabled so don't send results to the dashboard |
| + # but it was a successful run. |
| + return True |
|
perezju
2016/09/26 15:48:06
suggestion, maybe just keep the variable name as |
eyaich1
2016/09/26 16:28:29
Done.
|
| else: |
| charts = _GetDataFromLogProcessor(log_processor) |
| results = results_dashboard.MakeListOfPoints( |