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

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

Issue 791733005: split out chromium_mojo recipe changes from chromium_mojo master cl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: remove mac, win chromium_mojo slaves Created 6 years 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 slave import recipe_test_api 5 from slave import recipe_test_api
6 6
7 from . import builders 7 from . import builders
8 8
9 9
10 class ChromiumTestApi(recipe_test_api.RecipeTestApi): 10 class ChromiumTestApi(recipe_test_api.RecipeTestApi):
11 @property 11 @property
12 def builders(self): 12 def builders(self):
13 return builders.BUILDERS 13 return builders.BUILDERS
14
15 def gen_tests_for_builders(self, builder_dict):
16 # TODO: crbug.com/354674. Figure out where to put "simulation"
17 # tests. Is this really the right place?
iannucci 2014/12/12 23:45:19 this is an OK place... the test api can contain wh
18
19 def _sanitize_nonalpha(text):
20 return ''.join(c if c.isalnum() else '_' for c in text)
21
22 for mastername in builder_dict:
23 for buildername in builder_dict[mastername]['builders']:
24 if 'mac' in buildername or 'Mac' in buildername:
25 platform_name = 'mac'
26 elif 'win' in buildername or 'Win' in buildername:
27 platform_name = 'win'
28 else:
29 platform_name = 'linux'
30 test = (
31 self.test('full_%s_%s' % (_sanitize_nonalpha(mastername),
32 _sanitize_nonalpha(buildername))) +
33 self.m.platform.name(platform_name)
34 )
35 if mastername.startswith('tryserver'):
36 test += self.m.properties.tryserver(buildername=buildername,
37 mastername=mastername)
38 else:
39 test += self.m.properties.generic(buildername=buildername,
40 mastername=mastername)
41 yield test
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698