OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 """API for the bisect recipe module. | 5 """API for the bisect recipe module. |
6 | 6 |
7 This API is meant to enable the bisect recipe to bisect any chromium-supported | 7 This API is meant to enable the bisect recipe to bisect any chromium-supported |
8 platform for any test that can be run via buildbot, perf or otherwise. | 8 platform for any test that can be run via buildbot, perf or otherwise. |
9 """ | 9 """ |
10 | 10 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 def run_bisect_script(self, extra_src='', path_to_config='', **kwargs): | 103 def run_bisect_script(self, extra_src='', path_to_config='', **kwargs): |
104 """Executes run-perf-bisect-regression.py to perform bisection. | 104 """Executes run-perf-bisect-regression.py to perform bisection. |
105 | 105 |
106 Args: | 106 Args: |
107 extra_src (str): Path to extra source file. If this is supplied, | 107 extra_src (str): Path to extra source file. If this is supplied, |
108 bisect script will use this to override default behavior. | 108 bisect script will use this to override default behavior. |
109 path_to_config (str): Path to the config file to use. If this is supplied, | 109 path_to_config (str): Path to the config file to use. If this is supplied, |
110 the bisect script will use this to override the default config file | 110 the bisect script will use this to override the default config file |
111 path. | 111 path. |
112 """ | 112 """ |
113 self.m.step( | 113 self.m.python( |
114 'Preparing for Bisection', | 114 'Preparing for Bisection', |
115 [self.m.path['checkout'].join('tools', | 115 script=self.m.path['checkout'].join( |
116 'prepare-bisect-perf-regression.py'), | 116 'tools', 'prepare-bisect-perf-regression.py'), |
117 '-w', self.m.path['slave_build']]) | 117 args=['-w', self.m.path['slave_build']]) |
118 args = [] | 118 args = [] |
119 | 119 |
120 kwargs['allow_subannotations'] = True | 120 kwargs['allow_subannotations'] = True |
121 | 121 |
122 if extra_src: | 122 if extra_src: |
123 args = args + ['--extra_src', extra_src] | 123 args = args + ['--extra_src', extra_src] |
124 if path_to_config: | 124 if path_to_config: |
125 args = args + ['--path_to_config', path_to_config] | 125 args = args + ['--path_to_config', path_to_config] |
126 | 126 |
127 if self.m.chromium.c.TARGET_PLATFORM != 'android': | 127 if self.m.chromium.c.TARGET_PLATFORM != 'android': |
128 args += ['--path_to_goma', self.m.path['build'].join('goma')] | 128 args += ['--path_to_goma', self.m.path['build'].join('goma')] |
129 args += [ | 129 args += [ |
130 '--build-properties', | 130 '--build-properties', |
131 self.m.json.dumps(dict(self.m.properties.legacy())), | 131 self.m.json.dumps(dict(self.m.properties.legacy())), |
132 ] | 132 ] |
133 self.m.chromium.runtest( | 133 self.m.chromium.runtest( |
134 self.m.path['checkout'].join('tools', 'run-bisect-perf-regression.py'), | 134 self.m.path['checkout'].join('tools', 'run-bisect-perf-regression.py'), |
135 ['-w', self.m.path['slave_build']] + args, | 135 ['-w', self.m.path['slave_build']] + args, |
136 name='Running Bisection', | 136 name='Running Bisection', |
137 xvfb=True, **kwargs) | 137 xvfb=True, **kwargs) |
OLD | NEW |