| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import json | 5 import json |
| 6 import os | 6 import os |
| 7 | 7 |
| 8 import logging | 8 import logging |
| 9 | 9 |
| 10 from common import cache_decorator | 10 from lib.gitiles import cache_decorator |
| 11 from common.http_client_appengine import HttpClientAppengine as HttpClient | 11 from common.http_client_appengine import HttpClientAppengine as HttpClient |
| 12 from waterfall import buildbot | 12 from waterfall import buildbot |
| 13 from waterfall import swarming_util | 13 from waterfall import swarming_util |
| 14 | 14 |
| 15 | 15 |
| 16 @cache_decorator.Cached( | 16 @cache_decorator.Cached( |
| 17 namespace='trybots', cacher=cache_decorator.CompressedMemCacher()) | 17 namespace='trybots', cacher=cache_decorator.CompressedMemCacher()) |
| 18 def _LoadTrybots(): # pragma: no cover. | 18 def _LoadTrybots(): # pragma: no cover. |
| 19 """Returns the mapping of Commit Queue trybots to Waterfall buildbots.""" | 19 """Returns the mapping of Commit Queue trybots to Waterfall buildbots.""" |
| 20 with open(os.path.join(os.path.dirname(__file__), 'trybots.json'), 'r') as f: | 20 with open(os.path.join(os.path.dirname(__file__), 'trybots.json'), 'r') as f: |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 output = swarming_util.RetrieveShardedTestResultsFromIsolatedServer( | 161 output = swarming_util.RetrieveShardedTestResultsFromIsolatedServer( |
| 162 step_isolated_data[:1], http_client) | 162 step_isolated_data[:1], http_client) |
| 163 if output: | 163 if output: |
| 164 # Guess from the format. | 164 # Guess from the format. |
| 165 build_step.supported = ( | 165 build_step.supported = ( |
| 166 isinstance(output, dict) and | 166 isinstance(output, dict) and |
| 167 isinstance(output.get('all_tests'), list) and | 167 isinstance(output.get('all_tests'), list) and |
| 168 isinstance(output.get('per_iteration_data'), list) and | 168 isinstance(output.get('per_iteration_data'), list) and |
| 169 all(isinstance(i, dict) for i in output.get('per_iteration_data')) | 169 all(isinstance(i, dict) for i in output.get('per_iteration_data')) |
| 170 ) | 170 ) |
| OLD | NEW |