Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/test_api.py

Issue 1574433004: Allow a single trybot to mirror multiple waterfall bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@bot-config-and-test-db
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698