OLD | NEW |
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \ | 162 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \ |
163 else int(args['revision']) | 163 else int(args['revision']) |
164 self._got_revision = \ | 164 self._got_revision = \ |
165 None if args['got_revision'] == 'None' else int(args['got_revision']) | 165 None if args['got_revision'] == 'None' else int(args['got_revision']) |
166 self._do_upload_results = (False if args['do_upload_results'] == 'None' | 166 self._do_upload_results = (False if args['do_upload_results'] == 'None' |
167 else args['do_upload_results'] == 'True') | 167 else args['do_upload_results'] == 'True') |
168 # Figure out where we are going to store images generated by GM. | 168 # 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') | 169 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') | 170 self._gm_merge_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'merge') |
171 self._gm_expected_dir = os.path.join('expectations', 'gm', | 171 self._gm_expected_dir = os.path.join('expectations', 'gm', |
172 self._gm_image_subdir) | 172 self._builder_name) |
173 self._gm_actual_dir = os.path.join(self._gm_actual_basedir, | 173 self._gm_actual_dir = os.path.join(self._gm_actual_basedir, |
174 self._gm_image_subdir) | 174 self._builder_name) |
175 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'], | 175 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'], |
176 'gm-actual') | 176 'gm-actual') |
177 self._resource_dir = 'resources' | 177 self._resource_dir = 'resources' |
178 self._autogen_svn_username_file = '.autogen_svn_username' | 178 self._autogen_svn_username_file = '.autogen_svn_username' |
179 self._autogen_svn_password_file = '.autogen_svn_password' | 179 self._autogen_svn_password_file = '.autogen_svn_password' |
180 self._make_flags = shlex.split(args['make_flags'].replace('"', '')) | 180 self._make_flags = shlex.split(args['make_flags'].replace('"', '')) |
181 self._test_args = shlex.split(args['test_args'].replace('"', '')) | 181 self._test_args = shlex.split(args['test_args'].replace('"', '')) |
182 self._gm_args = shlex.split(args['gm_args'].replace('"', '')) | 182 self._gm_args = shlex.split(args['gm_args'].replace('"', '')) |
183 self._gm_args.append('--serialize') | 183 self._gm_args.append('--serialize') |
184 self._bench_args = shlex.split(args['bench_args'].replace('"', '')) | 184 self._bench_args = shlex.split(args['bench_args'].replace('"', '')) |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 else: | 379 else: |
380 raise BuildStepFailure('Build step failed.') | 380 raise BuildStepFailure('Build step failed.') |
381 except Exception: | 381 except Exception: |
382 print traceback.format_exc() | 382 print traceback.format_exc() |
383 if attempt + 1 >= step.attempts: | 383 if attempt + 1 >= step.attempts: |
384 raise | 384 raise |
385 # pylint: disable=W0212 | 385 # pylint: disable=W0212 |
386 step._WaitFunc(attempt) | 386 step._WaitFunc(attempt) |
387 attempt += 1 | 387 attempt += 1 |
388 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) | 388 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) |
OLD | NEW |