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 contextlib | 5 import contextlib |
6 import copy | 6 import copy |
7 import json | 7 import json |
8 | 8 |
9 from infra.libs.infra_types import freeze, thaw | 9 from infra.libs.infra_types import freeze, thaw |
10 from slave import recipe_api | 10 from slave import recipe_api |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 | 599 |
600 if bot_type == 'tester': | 600 if bot_type == 'tester': |
601 # Protect against hard to debug mismatches between directory names | 601 # Protect against hard to debug mismatches between directory names |
602 # used to run tests from and extract build to. We've had several cases | 602 # used to run tests from and extract build to. We've had several cases |
603 # where a stale build directory was used on a tester, and the extracted | 603 # where a stale build directory was used on a tester, and the extracted |
604 # build was not used at all, leading to confusion why source code changes | 604 # build was not used at all, leading to confusion why source code changes |
605 # are not taking effect. | 605 # are not taking effect. |
606 # | 606 # |
607 # The best way to ensure the old build directory is not used is to | 607 # The best way to ensure the old build directory is not used is to |
608 # remove it. | 608 # remove it. |
609 self.m.path.rmtree( | 609 self.m.file.rmtree( |
610 'build directory', | 610 'build directory', |
611 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) | 611 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) |
612 | 612 |
613 # Do not attempt to compose an archive URL if one is given. | 613 # Do not attempt to compose an archive URL if one is given. |
614 specified_url = self.m.properties.get('parent_build_archive_url') | 614 specified_url = self.m.properties.get('parent_build_archive_url') |
615 if specified_url: | 615 if specified_url: |
616 legacy_build_url = None | 616 legacy_build_url = None |
617 else: | 617 else: |
618 legacy_build_url = self._make_legacy_build_url(master_config, | 618 legacy_build_url = self._make_legacy_build_url(master_config, |
619 mastername) | 619 mastername) |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 master_config.get('build_gs_bucket'), | 842 master_config.get('build_gs_bucket'), |
843 extra_url_components=None) | 843 extra_url_components=None) |
844 elif (mastername == 'tryserver.chromium.perf' or | 844 elif (mastername == 'tryserver.chromium.perf' or |
845 (mastername == 'tryserver.chromium.linux' and | 845 (mastername == 'tryserver.chromium.linux' and |
846 buildername == 'linux_full_bisect_builder')): | 846 buildername == 'linux_full_bisect_builder')): |
847 return None | 847 return None |
848 else: | 848 else: |
849 return self.m.archive.legacy_upload_url( | 849 return self.m.archive.legacy_upload_url( |
850 master_config.get('build_gs_bucket'), | 850 master_config.get('build_gs_bucket'), |
851 extra_url_components=self.m.properties['mastername']) | 851 extra_url_components=self.m.properties['mastername']) |
OLD | NEW |