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

Side by Side Diff: buildbot/slave/skia_slave_scripts/build_step.py

Issue 23001003: Remove base-* directories from gm expected/actual paths; just use platform names (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: buildbot_slave Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 """Base class for all slave-side build steps. """ 5 """Base class for all slave-side build steps. """
6 6
7 import config 7 import config
8 # pylint: disable=W0611 8 # pylint: disable=W0611
9 import flavor_utils 9 import flavor_utils
10 import imp 10 import imp
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 'flavor_utils.%s' % flavor_utils_module_name, flavor_utils_path) 146 'flavor_utils.%s' % flavor_utils_module_name, flavor_utils_path)
147 flavor_utils_class_name = ''.join([part.title() for part in 147 flavor_utils_class_name = ''.join([part.title() for part in
148 flavor.split('_')]) 148 flavor.split('_')])
149 flavor_utils_class = getattr(flavor_utils_module, 149 flavor_utils_class = getattr(flavor_utils_module,
150 '%sBuildStepUtils' % flavor_utils_class_name) 150 '%sBuildStepUtils' % flavor_utils_class_name)
151 self._flavor_utils = flavor_utils_class(self) 151 self._flavor_utils = flavor_utils_class(self)
152 except (ImportError, IOError) as e: 152 except (ImportError, IOError) as e:
153 raise Exception('Unrecognized build flavor: %s\n%s' % (flavor, e)) 153 raise Exception('Unrecognized build flavor: %s\n%s' % (flavor, e))
154 154
155 self._configuration = args['configuration'] 155 self._configuration = args['configuration']
156 self._gm_image_subdir = args['gm_image_subdir']
157 156
158 self._target_platform = args['target_platform'] 157 self._target_platform = args['target_platform']
159 self._deps_target_os = \ 158 self._deps_target_os = \
160 None if args['deps_target_os'] == 'None' else args['deps_target_os'] 159 None if args['deps_target_os'] == 'None' else args['deps_target_os']
161 self._revision = \ 160 self._revision = \
162 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \ 161 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \
163 else int(args['revision']) 162 else int(args['revision'])
164 self._got_revision = \ 163 self._got_revision = \
165 None if args['got_revision'] == 'None' else int(args['got_revision']) 164 None if args['got_revision'] == 'None' else int(args['got_revision'])
166 self._do_upload_results = (False if args['do_upload_results'] == 'None' 165 self._do_upload_results = (False if args['do_upload_results'] == 'None'
167 else args['do_upload_results'] == 'True') 166 else args['do_upload_results'] == 'True')
168 # Figure out where we are going to store images generated by GM. 167 # Figure out where we are going to store images generated by GM.
169 self._gm_actual_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'actual') 168 self._gm_actual_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'actual')
170 self._gm_merge_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'merge') 169 self._gm_merge_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'merge')
171 self._gm_expected_dir = os.path.join('expectations', 'gm', 170 self._gm_expected_dir = os.path.join('expectations', 'gm',
172 self._gm_image_subdir) 171 self._builder_name)
173 self._gm_actual_dir = os.path.join(self._gm_actual_basedir, 172 self._gm_actual_dir = os.path.join(self._gm_actual_basedir,
174 self._gm_image_subdir) 173 self._builder_name)
175 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'], 174 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'],
176 'gm-actual') 175 'gm-actual')
177 self._resource_dir = 'resources' 176 self._resource_dir = 'resources'
178 self._autogen_svn_username_file = '.autogen_svn_username' 177 self._autogen_svn_username_file = '.autogen_svn_username'
179 self._autogen_svn_password_file = '.autogen_svn_password' 178 self._autogen_svn_password_file = '.autogen_svn_password'
180 self._make_flags = shlex.split(args['make_flags'].replace('"', '')) 179 self._make_flags = shlex.split(args['make_flags'].replace('"', ''))
181 self._test_args = shlex.split(args['test_args'].replace('"', '')) 180 self._test_args = shlex.split(args['test_args'].replace('"', ''))
182 self._gm_args = shlex.split(args['gm_args'].replace('"', '')) 181 self._gm_args = shlex.split(args['gm_args'].replace('"', ''))
183 self._gm_args.append('--serialize') 182 self._gm_args.append('--serialize')
184 self._bench_args = shlex.split(args['bench_args'].replace('"', '')) 183 self._bench_args = shlex.split(args['bench_args'].replace('"', ''))
185 self._is_try = args['is_try'] == 'True' 184 self._is_try = args['is_try'] == 'True'
186 185
187 if os.name == 'nt': 186 if os.name == 'nt':
188 self._default_make_flags = [] 187 self._default_make_flags = []
189 else: 188 else:
190 # Set the jobs limit to 4, since we have multiple slaves running on each 189 # Set the jobs limit to 4, since we have multiple slaves running on each
191 # machine. 190 # machine.
192 self._default_make_flags = ['--jobs', '4', '--max-load=4.0'] 191 self._default_make_flags = ['--jobs', '4', '--max-load=4.0']
193 192
194 # Adding the playback directory transfer objects. 193 # Adding the playback directory transfer objects.
195 self._local_playback_dirs = LocalSkpPlaybackDirs( 194 self._local_playback_dirs = LocalSkpPlaybackDirs(
196 self._builder_name, self._gm_image_subdir, 195 self._builder_name,
197 None if args['perf_output_basedir'] == 'None' 196 None if args['perf_output_basedir'] == 'None'
198 else args['perf_output_basedir']) 197 else args['perf_output_basedir'])
199 self._storage_playback_dirs = StorageSkpPlaybackDirs( 198 self._storage_playback_dirs = StorageSkpPlaybackDirs(
200 self._builder_name, self._gm_image_subdir, 199 self._builder_name,
201 None if args['perf_output_basedir'] == 'None' 200 None if args['perf_output_basedir'] == 'None'
202 else args['perf_output_basedir']) 201 else args['perf_output_basedir'])
203 202
204 self._skp_dir = self._local_playback_dirs.PlaybackSkpDir() 203 self._skp_dir = self._local_playback_dirs.PlaybackSkpDir()
205 204
206 # Figure out where we are going to store performance output. 205 # Figure out where we are going to store performance output.
207 if args['perf_output_basedir'] != 'None': 206 if args['perf_output_basedir'] != 'None':
208 self._perf_data_dir = os.path.join(args['perf_output_basedir'], 207 self._perf_data_dir = os.path.join(args['perf_output_basedir'],
209 self._builder_name, 'data') 208 self._builder_name, 'data')
210 self._perf_graphs_dir = os.path.join(args['perf_output_basedir'], 209 self._perf_graphs_dir = os.path.join(args['perf_output_basedir'],
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 else: 378 else:
380 raise BuildStepFailure('Build step failed.') 379 raise BuildStepFailure('Build step failed.')
381 except Exception: 380 except Exception:
382 print traceback.format_exc() 381 print traceback.format_exc()
383 if attempt + 1 >= step.attempts: 382 if attempt + 1 >= step.attempts:
384 raise 383 raise
385 # pylint: disable=W0212 384 # pylint: disable=W0212
386 step._WaitFunc(attempt) 385 step._WaitFunc(attempt)
387 attempt += 1 386 attempt += 1
388 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) 387 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1)
OLDNEW
« no previous file with comments | « buildbot/master/skia_master_scripts/utils.py ('k') | buildbot/slave/skia_slave_scripts/check_gs_timestamps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698