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

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

Issue 1819613002: Flip remaining chromium_gn bots to the chromium recipe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: update w/ review feedback, add deapply test Created 4 years, 9 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 | 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 recipe_engine import recipe_test_api 5 from recipe_engine import recipe_test_api
6 6
7 7
8 class ChromiumTestApi(recipe_test_api.RecipeTestApi): 8 class ChromiumTestApi(recipe_test_api.RecipeTestApi):
9 def gen_tests_for_builders(self, builder_dict, overrides=None): 9 def gen_tests_for_builders(self, builder_dict):
10 # TODO: crbug.com/354674. Figure out where to put "simulation" 10 # TODO: crbug.com/354674. Figure out where to put "simulation"
11 # tests. Is this really the right place? 11 # tests. Is this really the right place?
12 12
13 def _sanitize_nonalpha(text): 13 def _sanitize_nonalpha(text):
14 return ''.join(c if c.isalnum() else '_' for c in text) 14 return ''.join(c if c.isalnum() else '_' for c in text)
15 15
16 overrides = overrides or {}
17 for mastername in builder_dict: 16 for mastername in builder_dict:
18 for buildername in builder_dict[mastername]['builders']: 17 for buildername in builder_dict[mastername]['builders']:
19 if 'mac' in buildername or 'Mac' in buildername: 18 if 'mac' in buildername or 'Mac' in buildername:
20 platform_name = 'mac' 19 platform_name = 'mac'
21 elif 'win' in buildername or 'Win' in buildername: 20 elif 'win' in buildername or 'Win' in buildername:
22 platform_name = 'win' 21 platform_name = 'win'
23 else: 22 else:
24 platform_name = 'linux' 23 platform_name = 'linux'
25 test = ( 24 test = (
26 self.test('full_%s_%s' % (_sanitize_nonalpha(mastername), 25 self.test('full_%s_%s' % (_sanitize_nonalpha(mastername),
27 _sanitize_nonalpha(buildername))) + 26 _sanitize_nonalpha(buildername))) +
28 self.m.platform.name(platform_name) 27 self.m.platform.name(platform_name)
29 ) 28 )
30 if mastername.startswith('tryserver'): 29 if mastername.startswith('tryserver'):
31 test += self.m.properties.tryserver(buildername=buildername, 30 test += self.m.properties.tryserver(buildername=buildername,
32 mastername=mastername) 31 mastername=mastername)
33 else: 32 else:
34 test += self.m.properties.generic(buildername=buildername, 33 test += self.m.properties.generic(buildername=buildername,
35 mastername=mastername) 34 mastername=mastername)
36 35
37 override_step_data = overrides.get(mastername, {}).get(buildername,
38 None)
39 if override_step_data:
40 test += override_step_data
41 yield test 36 yield test
42 37
43 # The following data was generated by running 'gyp_chromium 38 # The following data was generated by running 'gyp_chromium
44 # --analyzer' with input JSON files corresponding to changes 39 # --analyzer' with input JSON files corresponding to changes
45 # affecting these targets. 40 # affecting these targets.
46 @property 41 @property
47 def analyze_builds_nothing(self): 42 def analyze_builds_nothing(self):
48 return self.m.json.output({ 43 return self.m.json.output({
49 'status': 'No dependencies', 44 'status': 'No dependencies',
50 'compile_targets': [], 45 'compile_targets': [],
51 'test_targets': [], 46 'test_targets': [],
52 }) 47 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698