OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 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 """Utility class to build the Skia master BuildFactory's for HouseKeeping bots. | |
6 | |
7 Overrides SkiaFactory with Per-commit HouseKeeping steps.""" | |
8 | |
9 | |
10 import builder_name_schema | |
11 | |
12 from skia_master_scripts import factory as skia_factory | |
13 | |
14 | |
15 # TODO: The HouseKeepingPerCommitFactory uses shell scripts, so it would break | |
16 # on Windows. For now, we reply on the fact that the housekeeping bot always | |
17 # runs on a Linux machine. | |
18 class HouseKeepingPerCommitFactory(skia_factory.SkiaFactory): | |
19 """Overrides for HouseKeeping per-commit builds.""" | |
20 def __init__(self, **kwargs): | |
21 skia_factory.SkiaFactory.__init__(self, build_targets=['tools', 'gm', 'dm'], | |
22 **kwargs) | |
23 | |
24 def Build(self, role=builder_name_schema.BUILDER_ROLE_HOUSEKEEPER, | |
25 clobber=None): | |
26 """Build and return the complete BuildFactory. | |
27 | |
28 role: string; type of builder. | |
29 clobber: boolean indicating whether we should clean before building | |
30 """ | |
31 if role != builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: | |
32 raise Exception('Housekeeping builders must have role "%s"' % | |
33 builder_name_schema.BUILDER_ROLE_HOUSEKEEPER) | |
34 | |
35 self.UpdateSteps() | |
36 self.Compile(clobber) | |
37 | |
38 # TODO(borenet): Move these to a self-tests bot (http://skbug.com/2144) | |
39 self.AddSlaveScript(script='run_tool_self_tests.py', | |
40 description='RunToolSelfTests') | |
41 self.AddSlaveScript(script='run_gm_self_tests.py', | |
42 description='RunGmSelfTests') | |
43 | |
44 # Run unittests for Anroid platform_tools | |
45 self.AddSlaveScript(script='run_android_platform_self_tests.py', | |
46 description='RunAndroidPlatformSelfTests') | |
47 | |
48 # Check for static initializers. | |
49 self.AddSlaveScript(script='detect_static_initializers.py', | |
50 description='DetectStaticInitializers') | |
51 | |
52 if not self._do_patch_step: # Do not run Doxygen steps if try job. | |
53 self.AddSlaveScript(script='generate_doxygen.py', | |
54 description='GenerateDoxygen') | |
55 self.AddSlaveScript(script='upload_doxygen.py', | |
56 description='UploadDoxygen', | |
57 is_upload_render_step=True) | |
58 | |
59 self.AddSlaveScript(script='run_buildbot_self_tests.py', | |
60 description='BuildbotSelfTests') | |
61 self.AddSlaveScript(script='check_compile_times.py', | |
62 description='CheckCompileTimes') | |
63 self.Validate() | |
64 return self | |
OLD | NEW |