| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 from recipe_engine import recipe_test_api | 5 from recipe_engine import recipe_test_api |
| 6 | 6 |
| 7 from . import builders | 7 from . import builders |
| 8 from . import trybots | 8 from . import trybots |
| 9 | 9 |
| 10 | 10 |
| 11 class ChromiumTestsApi(recipe_test_api.RecipeTestApi): | 11 class ChromiumTestsApi(recipe_test_api.RecipeTestApi): |
| 12 @property | 12 @property |
| 13 def builders(self): | 13 def builders(self): |
| 14 return builders.BUILDERS | 14 return builders.BUILDERS |
| 15 | 15 |
| 16 @property | 16 @property |
| 17 def trybots(self): | 17 def trybots(self): |
| 18 return trybots.TRYBOTS | 18 return trybots.TRYBOTS |
| 19 | 19 |
| 20 def platform(self, mastername, buildername): | 20 def platform(self, mastername, buildername): |
| 21 bot_config = builders.BUILDERS[mastername]['builders'][buildername] | 21 bot_config = builders.BUILDERS[mastername]['builders'][buildername] |
| 22 # TODO(phajdan.jr): Get the bitness from actual config for that bot. | 22 # TODO(phajdan.jr): Get the bitness from actual config for that bot. |
| 23 return self.m.platform( | 23 return self.m.platform( |
| 24 bot_config['testing']['platform'], | 24 bot_config['testing']['platform'], |
| 25 bot_config.get( | 25 bot_config.get( |
| 26 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) | 26 'chromium_config_kwargs', {}).get('TARGET_BITS', 64)) |
| 27 |
| 28 def normalize_bot_descs(self, bot_descs): |
| 29 # Must have the same effect as normalize_bot_descs in the real API. |
| 30 if not isinstance(bot_descs, (list, tuple)): |
| 31 return [bot_descs] |
| 32 return bot_descs |
| OLD | NEW |