| 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 import errno | 8 import errno |
| 9 import multiprocessing | 9 import multiprocessing |
| 10 import os | 10 import os |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 self._revision = \ | 277 self._revision = \ |
| 278 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \ | 278 None if args['revision'] == 'None' or args['revision'] == 'HEAD' \ |
| 279 else int(args['revision']) | 279 else int(args['revision']) |
| 280 self._got_revision = \ | 280 self._got_revision = \ |
| 281 None if args['got_revision'] == 'None' else int(args['got_revision']) | 281 None if args['got_revision'] == 'None' else int(args['got_revision']) |
| 282 self._do_upload_results = (False if args['do_upload_results'] == 'None' | 282 self._do_upload_results = (False if args['do_upload_results'] == 'None' |
| 283 else args['do_upload_results'] == 'True') | 283 else args['do_upload_results'] == 'True') |
| 284 # Figure out where we are going to store images generated by GM. | 284 # Figure out where we are going to store images generated by GM. |
| 285 self._gm_actual_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'actual') | 285 self._gm_actual_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'actual') |
| 286 self._gm_merge_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'merge') | 286 self._gm_merge_basedir = os.path.join(os.pardir, os.pardir, 'gm', 'merge') |
| 287 self._gm_expected_dir = os.path.join(os.pardir, 'gm-expected', | 287 self._gm_expected_dir = os.path.join('expectations', 'gm', |
| 288 self._gm_image_subdir) | 288 self._gm_image_subdir) |
| 289 self._gm_actual_dir = os.path.join(self._gm_actual_basedir, | 289 self._gm_actual_dir = os.path.join(self._gm_actual_basedir, |
| 290 self._gm_image_subdir) | 290 self._gm_image_subdir) |
| 291 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'], | 291 self._gm_actual_svn_baseurl = '%s/%s' % (args['autogen_svn_baseurl'], |
| 292 'gm-actual') | 292 'gm-actual') |
| 293 self._resource_dir = 'resources' | 293 self._resource_dir = 'resources' |
| 294 self._autogen_svn_username_file = '.autogen_svn_username' | 294 self._autogen_svn_username_file = '.autogen_svn_username' |
| 295 self._autogen_svn_password_file = '.autogen_svn_password' | 295 self._autogen_svn_password_file = '.autogen_svn_password' |
| 296 self._make_flags = shlex.split(args['make_flags'].replace('"', '')) | 296 self._make_flags = shlex.split(args['make_flags'].replace('"', '')) |
| 297 self._test_args = shlex.split(args['test_args'].replace('"', '')) | 297 self._test_args = shlex.split(args['test_args'].replace('"', '')) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 self._skimage_expected_dir = os.path.join('expectations', 'skimage') | 334 self._skimage_expected_dir = os.path.join('expectations', 'skimage') |
| 335 | 335 |
| 336 self._skimage_out_dir = os.path.join('out', self._configuration, | 336 self._skimage_out_dir = os.path.join('out', self._configuration, |
| 337 'skimage_out') | 337 'skimage_out') |
| 338 | 338 |
| 339 # Note that DeviceDirs.GMExpectedDir() is being set up to point at a | 339 # Note that DeviceDirs.GMExpectedDir() is being set up to point at a |
| 340 # DIFFERENT directory than self._gm_expected. | 340 # DIFFERENT directory than self._gm_expected. |
| 341 # self._gm_expected : The SVN-managed directory on the buildbot host | 341 # self._gm_expected : The SVN-managed directory on the buildbot host |
| 342 # where canonical expectations are stored. | 342 # where canonical expectations are stored. |
| 343 # Currently, they are stored there as | |
| 344 # individual image files. | |
| 345 # DeviceDirs.GMExpectedDir(): A temporary directory on the device we are | 343 # DeviceDirs.GMExpectedDir(): A temporary directory on the device we are |
| 346 # testing, where the PreRender step will put | 344 # testing, where the PreRender step will put |
| 347 # an expected-results.json file that describes | 345 # an expected-results.json file that describes |
| 348 # all GM results expectations. | 346 # all GM results expectations. |
| 349 # TODO(epoger): Update the above description as we move through the steps in | 347 # TODO(epoger): Update the above description as we move through the steps in |
| 350 # https://goto.google.com/ChecksumTransitionDetail | 348 # https://goto.google.com/ChecksumTransitionDetail |
| 351 self._device_dirs = DeviceDirs( | 349 self._device_dirs = DeviceDirs( |
| 352 perf_data_dir=self._perf_data_dir, | 350 perf_data_dir=self._perf_data_dir, |
| 353 gm_actual_dir=os.path.join(os.pardir, os.pardir, 'gm', 'actual'), | 351 gm_actual_dir=os.path.join(os.pardir, os.pardir, 'gm', 'actual'), |
| 354 gm_expected_dir=os.path.join(os.pardir, os.pardir, 'gm', 'expected'), | 352 gm_expected_dir=os.path.join(os.pardir, os.pardir, 'gm', 'expected'), |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 else: | 482 else: |
| 485 raise BuildStepFailure('Build step failed.') | 483 raise BuildStepFailure('Build step failed.') |
| 486 except Exception: | 484 except Exception: |
| 487 print traceback.format_exc() | 485 print traceback.format_exc() |
| 488 if attempt + 1 >= step.attempts: | 486 if attempt + 1 >= step.attempts: |
| 489 raise | 487 raise |
| 490 # pylint: disable=W0212 | 488 # pylint: disable=W0212 |
| 491 step._WaitFunc(attempt) | 489 step._WaitFunc(attempt) |
| 492 attempt += 1 | 490 attempt += 1 |
| 493 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) | 491 print '**** %s, attempt %d ****' % (StepType.__name__, attempt + 1) |
| OLD | NEW |