OLD | NEW |
| (Empty) |
1 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 | |
6 from canary_factory import CanaryFactory | |
7 | |
8 import builder_name_schema | |
9 | |
10 | |
11 class AutoRollFactory(CanaryFactory): | |
12 """Factory which runs the Blink AutoRoll bot for Skia.""" | |
13 | |
14 def __init__(self, **kwargs): | |
15 """Instantiates an AutoRollFactory""" | |
16 CanaryFactory.__init__(self, | |
17 flavor='chrome', | |
18 path_to_skia=['third_party', 'skia'], | |
19 **kwargs) | |
20 | |
21 def Build(self, role=builder_name_schema.BUILDER_ROLE_HOUSEKEEPER, | |
22 clobber=None, **kwargs): | |
23 """Build and return the complete BuildFactory. | |
24 | |
25 role: string; type of builder. | |
26 clobber: boolean indicating whether we should clean before building | |
27 """ | |
28 if role != builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: | |
29 raise Exception('Housekeeping builders must have role "%s"' % | |
30 builder_name_schema.BUILDER_ROLE_HOUSEKEEPER) | |
31 | |
32 self.UpdateSteps() | |
33 self.AddSlaveScript(script='do_auto_roll.py', description='AutoRoll') | |
34 self.Validate() | |
35 return self | |
36 | |
OLD | NEW |