| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import collections | 5 import collections |
| 6 import contextlib | 6 import contextlib |
| 7 import copy | 7 import copy |
| 8 import itertools | 8 import itertools |
| 9 import json | 9 import json |
| 10 | 10 |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 # build was not used at all, leading to confusion why source code changes | 487 # build was not used at all, leading to confusion why source code changes |
| 488 # are not taking effect. | 488 # are not taking effect. |
| 489 # | 489 # |
| 490 # The best way to ensure the old build directory is not used is to | 490 # The best way to ensure the old build directory is not used is to |
| 491 # remove it. | 491 # remove it. |
| 492 self.m.file.rmtree( | 492 self.m.file.rmtree( |
| 493 'build directory', | 493 'build directory', |
| 494 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) | 494 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) |
| 495 | 495 |
| 496 legacy_build_url = None | 496 legacy_build_url = None |
| 497 got_revision = update_step.presentation.properties['got_revision'] |
| 497 build_revision = build_revision or self.m.properties.get( | 498 build_revision = build_revision or self.m.properties.get( |
| 498 'parent_got_revision') or update_step.presentation.properties[ | 499 'parent_got_revision') or got_revision |
| 499 'got_revision'] | |
| 500 build_archive_url = build_archive_url or self.m.properties.get( | 500 build_archive_url = build_archive_url or self.m.properties.get( |
| 501 'parent_build_archive_url') | 501 'parent_build_archive_url') |
| 502 if build_archive_url is None: | 502 if build_archive_url is None: |
| 503 master_config = bot_db.get_master_settings(mastername) | 503 master_config = bot_db.get_master_settings(mastername) |
| 504 legacy_build_url = self._make_legacy_build_url(master_config, mastername) | 504 legacy_build_url = self._make_legacy_build_url(master_config, mastername) |
| 505 | 505 |
| 506 self.m.archive.download_and_unzip_build( | 506 self.m.archive.download_and_unzip_build( |
| 507 step_name='extract build', | 507 step_name='extract build', |
| 508 target=self.m.chromium.c.build_config_fs, | 508 target=self.m.chromium.c.build_config_fs, |
| 509 build_url=legacy_build_url, | 509 build_url=legacy_build_url, |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 def get_compile_targets_for_scripts(self): | 829 def get_compile_targets_for_scripts(self): |
| 830 return self.m.python( | 830 return self.m.python( |
| 831 name='get compile targets for scripts', | 831 name='get compile targets for scripts', |
| 832 script=self.m.path['checkout'].join( | 832 script=self.m.path['checkout'].join( |
| 833 'testing', 'scripts', 'get_compile_targets.py'), | 833 'testing', 'scripts', 'get_compile_targets.py'), |
| 834 args=[ | 834 args=[ |
| 835 '--output', self.m.json.output(), | 835 '--output', self.m.json.output(), |
| 836 '--', | 836 '--', |
| 837 ] + self.get_common_args_for_scripts(), | 837 ] + self.get_common_args_for_scripts(), |
| 838 step_test_data=lambda: self.m.json.test_api.output({})) | 838 step_test_data=lambda: self.m.json.test_api.output({})) |
| OLD | NEW |