Chromium Code Reviews| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 verbose=True, | 399 verbose=True, |
| 400 set_swarm_hashes=False) | 400 set_swarm_hashes=False) |
| 401 | 401 |
| 402 def archive_build(self, mastername, buildername, update_step, bot_db): | 402 def archive_build(self, mastername, buildername, update_step, bot_db): |
| 403 bot_config = bot_db.get_bot_config(mastername, buildername) | 403 bot_config = bot_db.get_bot_config(mastername, buildername) |
| 404 | 404 |
| 405 if bot_config.get('bot_type') == 'builder': | 405 if bot_config.get('bot_type') == 'builder': |
| 406 if not bot_config.get('cf_archive_build'): | 406 if not bot_config.get('cf_archive_build'): |
| 407 master_config = bot_db.get_master_settings(mastername) | 407 master_config = bot_db.get_master_settings(mastername) |
| 408 build_revision = update_step.presentation.properties['got_revision'] | 408 build_revision = update_step.presentation.properties['got_revision'] |
| 409 | |
| 410 # For archiving 'chromium.perf', the builder also archives a version | |
| 411 # without perf test files. | |
|
RobertoCN
2016/08/03 20:49:49
Maybe link to the bug for more context?
miimnk
2016/08/03 21:37:11
Fixed
| |
| 412 if (mastername.startswith('chromium.perf') and | |
| 413 buildername == 'Linux Builder'): | |
| 414 self.m.archive.zip_and_upload_build( | |
| 415 'package build for bisect', | |
| 416 self.m.chromium.c.build_config_fs, | |
| 417 build_url=self._build_gs_archive_url( | |
| 418 mastername, master_config, buildername, strip_symbol = True), | |
| 419 build_revision=build_revision, | |
| 420 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, | |
| 421 update_properties=update_step.presentation.properties, | |
| 422 includePerfTestFiles=False, | |
| 423 store_by_hash=False | |
| 424 ) | |
| 425 | |
| 409 self.m.archive.zip_and_upload_build( | 426 self.m.archive.zip_and_upload_build( |
| 410 'package build', | 427 'package build', |
| 411 self.m.chromium.c.build_config_fs, | 428 self.m.chromium.c.build_config_fs, |
| 412 build_url=self._build_gs_archive_url( | 429 build_url=self._build_gs_archive_url( |
| 413 mastername, master_config, buildername), | 430 mastername, master_config, buildername), |
| 414 build_revision=build_revision, | 431 build_revision=build_revision, |
| 415 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, | 432 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, |
| 416 # TODO(machenbach): Make asan a configuration switch. | 433 # TODO(machenbach): Make asan a configuration switch. |
| 417 package_dsym_files=( | 434 package_dsym_files=( |
| 418 self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan') and | 435 self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan') and |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 755 self.m.swarming.default_user = requester | 772 self.m.swarming.default_user = requester |
| 756 | 773 |
| 757 patch_project = self.m.properties.get('patch_project') | 774 patch_project = self.m.properties.get('patch_project') |
| 758 if patch_project: | 775 if patch_project: |
| 759 self.m.swarming.add_default_tag('patch_project:%s' % patch_project) | 776 self.m.swarming.add_default_tag('patch_project:%s' % patch_project) |
| 760 else: | 777 else: |
| 761 self.m.swarming.default_priority = MASTER_SWARMING_PRIORITIES[mastername] | 778 self.m.swarming.default_priority = MASTER_SWARMING_PRIORITIES[mastername] |
| 762 self.m.swarming.add_default_tag('purpose:post-commit') | 779 self.m.swarming.add_default_tag('purpose:post-commit') |
| 763 self.m.swarming.add_default_tag('purpose:CI') | 780 self.m.swarming.add_default_tag('purpose:CI') |
| 764 | 781 |
| 765 def _build_gs_archive_url(self, mastername, master_config, buildername): | 782 def _build_gs_archive_url(self, mastername, master_config, buildername, |
| 783 strip_symbol = False): | |
| 766 """Returns the archive URL to pass to self.m.archive.zip_and_upload_build. | 784 """Returns the archive URL to pass to self.m.archive.zip_and_upload_build. |
| 767 | 785 |
| 768 Most builders on most masters use a standard format for the build archive | 786 Most builders on most masters use a standard format for the build archive |
| 769 URL, but some builders on some masters may specify custom places to upload | 787 URL, but some builders on some masters may specify custom places to upload |
| 770 builds to. These special cases include: | 788 builds to. These special cases include: |
| 771 'chromium.perf' or 'chromium.perf.fyi': | 789 'chromium.perf' or 'chromium.perf.fyi': |
| 772 Exclude the name of the master from the url. | 790 Exclude the name of the master from the url. |
| 773 'tryserver.chromium.perf', or | 791 'tryserver.chromium.perf', or |
| 774 linux_full_bisect_builder on 'tryserver.chromium.linux': | 792 linux_full_bisect_builder on 'tryserver.chromium.linux': |
| 775 Return None so that the archive url specified in factory_properties | 793 Return None so that the archive url specified in factory_properties |
| 776 (as set on the master's configuration) is used instead. | 794 (as set on the master's configuration) is used instead. |
| 777 """ | 795 """ |
| 778 if mastername.startswith('chromium.perf'): | 796 if mastername.startswith('chromium.perf'): |
| 797 if strip_symbol: | |
| 798 return self.m.archive.legacy_upload_url( | |
| 799 master_config.get('bisect_build_gs_bucket'), | |
| 800 extra_url_components=None) | |
| 779 return self.m.archive.legacy_upload_url( | 801 return self.m.archive.legacy_upload_url( |
| 780 master_config.get('build_gs_bucket'), | 802 master_config.get('build_gs_bucket'), |
| 781 extra_url_components=None) | 803 extra_url_components=None) |
| 782 elif (mastername == 'tryserver.chromium.perf' or | 804 elif (mastername == 'tryserver.chromium.perf' or |
| 783 (mastername == 'tryserver.chromium.linux' and | 805 (mastername == 'tryserver.chromium.linux' and |
| 784 buildername == 'linux_full_bisect_builder')): | 806 buildername == 'linux_full_bisect_builder')): |
| 785 return None | 807 return None |
| 786 else: | 808 else: |
| 787 return self.m.archive.legacy_upload_url( | 809 return self.m.archive.legacy_upload_url( |
| 788 master_config.get('build_gs_bucket'), | 810 master_config.get('build_gs_bucket'), |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 829 def get_compile_targets_for_scripts(self): | 851 def get_compile_targets_for_scripts(self): |
| 830 return self.m.python( | 852 return self.m.python( |
| 831 name='get compile targets for scripts', | 853 name='get compile targets for scripts', |
| 832 script=self.m.path['checkout'].join( | 854 script=self.m.path['checkout'].join( |
| 833 'testing', 'scripts', 'get_compile_targets.py'), | 855 'testing', 'scripts', 'get_compile_targets.py'), |
| 834 args=[ | 856 args=[ |
| 835 '--output', self.m.json.output(), | 857 '--output', self.m.json.output(), |
| 836 '--', | 858 '--', |
| 837 ] + self.get_common_args_for_scripts(), | 859 ] + self.get_common_args_for_scripts(), |
| 838 step_test_data=lambda: self.m.json.test_api.output({})) | 860 step_test_data=lambda: self.m.json.test_api.output({})) |
| OLD | NEW |