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

Side by Side Diff: slave/skia_slave_scripts/run_dm.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: retry upload 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Run the Skia DM executable. """
7
8 from build_step import BuildStep
9 import builder_name_schema
10 import sys
11
12 class RunDM(BuildStep):
13 def __init__(self, *args, **kwargs):
14 super(RunDM, self).__init__(*args, **kwargs)
15 # Valgrind is slow.
16 if self._AnyMatch('Valgrind'):
17 self.timeout *= 5
18
19 def _AnyMatch(self, *args):
20 return any(arg in self._builder_name for arg in args)
21
22 def _KeyParams(self):
23 """Build a unique key from the builder name (as a list).
24
25 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
26 """
27 # Don't bother to include role, which is always Test.
28 # TryBots are uploaded elsewhere so they can use the same key.
29 blacklist = ['role', 'is_trybot']
30
31 params = builder_name_schema.DictForBuilderName(self._builder_name)
32 flat = []
33 for k in sorted(params.keys()):
34 if k not in blacklist:
35 flat.append(k)
36 flat.append(params[k])
37 return flat
38
39 def _Run(self):
40 args = [
41 '--verbose',
42 '--resourcePath', self._device_dirs.ResourceDir(),
43 '--skps', self._device_dirs.SKPDir(),
44 '--writePath', self._device_dirs.DMDir(),
45 '--nameByHash',
46 '--properties', 'gitHash', self._got_revision,
47 'build_number', str(self._build_number),
48 ]
49 args.append('--key')
50 args.extend(self._KeyParams())
51
52 match = []
53
54 if self._AnyMatch('Alex'): # skia:2793
55 args.extend(['--threads', '1'])
56
57 if self._AnyMatch('Xoom'): # skia:1699
58 match.append('~WritePixels')
59
60 if self._AnyMatch('Venue8'): # skia:2922
61 match.append('~imagealphathreshold')
62
63 # Though their GPUs are interesting, these don't test anything on
64 # the CPU that other ARMv7+NEON bots don't test faster (N5).
65 if self._AnyMatch('Nexus10', 'Nexus7'):
66 args.append('--nocpu')
67
68 if match:
69 args.append('--match')
70 args.extend(match)
71
72 self._flavor_utils.RunFlavoredCmd('dm', args)
73
74 if self._AnyMatch('Valgrind'): # skia:2789
75 abandonGpuContext = list(args)
76 abandonGpuContext.append('--abandonGpuContext')
77 abandonGpuContext.append('--nocpu')
78 self._flavor_utils.RunFlavoredCmd('dm', abandonGpuContext)
79
80 if '__main__' == __name__:
81 sys.exit(BuildStep.RunBuildStep(RunDM))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698