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

Side by Side Diff: master/skia_master_scripts/drt_canary_factory.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 years, 2 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
« no previous file with comments | « master/skia_master_scripts/commands.py ('k') | master/skia_master_scripts/factory.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2013 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 buildbot.process.properties import WithProperties
7
8 import builder_name_schema
9 import factory
10 import os
11
12
13 class DRTCanaryFactory(factory.SkiaFactory):
14 """ Subclass of Factory which builds Chrome with LKGR Skia, runs layout tests,
15 then updates Skia to the most recent revision and runs the layout tests again,
16 looking for diffs.
17 """
18 def __init__(self, path_to_skia, **kwargs):
19 """ Instantiates a DRTCanaryFactory.
20
21 path_to_skia: list of strings; indicates the path from the root of the
22 project to the project's copy of Skia.
23 """
24 factory.SkiaFactory.__init__(self,
25 flavor='chrome_canary',
26 build_targets=['content_shell',
27 'dump_syms',
28 'minidump_stackwalk'],
29 **kwargs)
30 self._path_to_skia = self.TargetPath.join(*path_to_skia)
31
32 # pylint: disable=W0221
33 def Update(self, use_lkgr_skia=False):
34 """ Override of Update() which may sync Skia to LKGR instead of
35 self._revision, without setting got_revision. """
36 args = ['--gyp_defines',
37 ' '.join('%s=%s' % (k, v) for k, v in self._gyp_defines.items())]
38 if use_lkgr_skia:
39 args.extend(['--use_lkgr_skia', 'True'])
40 else:
41 args.extend(['--chrome_rev', WithProperties('%(chrome_revision)s')])
42
43 self.AddFlavoredSlaveScript(
44 script=self.TargetPath.join(os.pardir, os.pardir, os.pardir, os.pardir,
45 os.pardir, 'slave', 'skia_slave_scripts',
46 '%s_update.py' % self._flavor),
47 description='Update',
48 timeout=None,
49 halt_on_failure=True,
50 is_rebaseline_step=True,
51 get_props_from_stdout=(
52 {'chrome_revision': 'Chrome updated to (\w+)',
53 'skia_base_rev': 'Skia updated to (\w+)'} if use_lkgr_skia
54 else {'chrome_revision2': 'Chrome updated to (\w+)',
55 'got_revision': 'Skia updated to (\w+)'}),
56 workdir='build',
57 args=args)
58
59 def PreTest(self):
60 """ Step to run before running tests. """
61 self.AddFlavoredSlaveScript(script='chrome_drt_canary_pretest.py',
62 description='PreTest')
63
64 def RunWebkitTests(self, new_baseline=False):
65 self.AddFlavoredSlaveScript(script='chrome_drt_canary_run_webkit_tests.py',
66 description='RunWebkitTests',
67 args=(['--new_baseline', 'True']
68 if new_baseline
69 else ['--write_results', 'True']))
70
71 def UploadTestResults(self):
72 self.AddFlavoredSlaveScript(script='chrome_drt_canary_upload_results.py',
73 description='UploadTestResults',
74 is_upload_render_step=True)
75
76 def Build(self, role=builder_name_schema.BUILDER_ROLE_CANARY, clobber=None):
77 """Build and return the complete BuildFactory.
78
79 role: string; type of builder.
80 """
81 if role != builder_name_schema.BUILDER_ROLE_CANARY:
82 raise Exception('Canary builders must have role "%s"' %
83 builder_name_schema.BUILDER_ROLE_CANARY)
84
85 self.UpdateScripts()
86 self.Update(use_lkgr_skia=True)
87 self.Compile(retry_without_werr_on_failure=True)
88 self.PreTest()
89 self.RunWebkitTests(new_baseline=True)
90 self.Update(use_lkgr_skia=False)
91 if self._do_patch_step:
92 self.ApplyPatch()
93 self.Compile(retry_without_werr_on_failure=True)
94 self.RunWebkitTests(new_baseline=False)
95 self.UploadTestResults()
96 self.Validate()
97 return self
OLDNEW
« no previous file with comments | « master/skia_master_scripts/commands.py ('k') | master/skia_master_scripts/factory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698