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

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

Issue 339183013: De-duplicate steps between chromium and chromium_trybot recipes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: fixes Created 6 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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_api 5 from slave import recipe_api
6 from slave import recipe_util 6 from slave import recipe_util
7 7
8 from . import builders 8 from . import builders
9 from . import steps
9 10
10 11
11 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): 12 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder):
12 def __init__(self, api, tests): 13 def __init__(self, api, tests):
13 self.raw = api.m.raw_io.input('\n'.join(tests)) 14 self.raw = api.m.raw_io.input('\n'.join(tests))
14 super(TestLauncherFilterFileInputPlaceholder, self).__init__() 15 super(TestLauncherFilterFileInputPlaceholder, self).__init__()
15 16
16 def render(self, test): 17 def render(self, test):
17 result = self.raw.render(test) 18 result = self.raw.render(test)
18 if not test.enabled: # pragma: no cover 19 if not test.enabled: # pragma: no cover
(...skipping 27 matching lines...) Expand all
46 else self.m.platform.bits), 47 else self.m.platform.bits),
47 48
48 'BUILD_CONFIG': self.m.properties.get('build_config', 'Release') 49 'BUILD_CONFIG': self.m.properties.get('build_config', 'Release')
49 } 50 }
50 51
51 @property 52 @property
52 def builders(self): 53 def builders(self):
53 return builders.BUILDERS 54 return builders.BUILDERS
54 55
55 @property 56 @property
57 def steps(self):
58 return steps
59
60 @property
56 def output_dir(self): 61 def output_dir(self):
57 """Return the path to the built executable directory.""" 62 """Return the path to the built executable directory."""
58 return self.c.build_dir.join(self.c.build_config_fs) 63 return self.c.build_dir.join(self.c.build_config_fs)
59 64
60 @property 65 @property
61 def version(self): 66 def version(self):
62 """Returns a version dictionary (after get_version()), e.g. 67 """Returns a version dictionary (after get_version()), e.g.
63 68
64 { 'MAJOR'": '37', 'MINOR': '0', 'BUILD': '2021', 'PATCH': '0' } 69 { 'MAJOR'": '37', 'MINOR': '0', 'BUILD': '2021', 'PATCH': '0' }
65 """ 70 """
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 steps = [] 474 steps = []
470 if bot_type in ['tester', 'builder_tester'] and test_steps: 475 if bot_type in ['tester', 'builder_tester'] and test_steps:
471 if self.m.platform.is_win: 476 if self.m.platform.is_win:
472 steps.append(self.crash_handler()) 477 steps.append(self.crash_handler())
473 478
474 steps.extend(test_steps) 479 steps.extend(test_steps)
475 480
476 if self.m.platform.is_win: 481 if self.m.platform.is_win:
477 steps.append(self.process_dumps()) 482 steps.append(self.process_dumps())
478 return steps 483 return steps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698