Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/api.py

Issue 2128613005: Archive Linux perf builds for manual bisect (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Archive Linux perf builds for manual bisect [2] Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 wit hout perf test files.
dimu1 2016/07/07 21:54:11 nit: 80 words
411 if mastername.startswith('chromium.perf'):
412 self.m.archive.zip_and_upload_build(
413 'package build',
414 self.m.chromium.c.build_config_fs,
415 build_url=self._build_gs_archive_url(
416 mastername, master_config, buildername, no_symbol_save = True) ,
417 build_revision=build_revision,
418 cros_board=self.m.chromium.c.TARGET_CROS_BOARD,
419 # TODO(machenbach): Make asan a configuration switch.
420 package_dsym_files=(
421 self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan') and
422 self.m.chromium.c.HOST_PLATFORM == 'mac'),
423 update_properties = update_step.presentation.properties,
dimu1 2016/07/07 21:54:11 nit: remove the space around '='
424 includePerfTestFiles = False,
425 store_by_hash = False
426 )
427
409 self.m.archive.zip_and_upload_build( 428 self.m.archive.zip_and_upload_build(
410 'package build', 429 'package build',
411 self.m.chromium.c.build_config_fs, 430 self.m.chromium.c.build_config_fs,
412 build_url=self._build_gs_archive_url( 431 build_url=self._build_gs_archive_url(
413 mastername, master_config, buildername), 432 mastername, master_config, buildername),
414 build_revision=build_revision, 433 build_revision=build_revision,
415 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, 434 cros_board=self.m.chromium.c.TARGET_CROS_BOARD,
416 # TODO(machenbach): Make asan a configuration switch. 435 # TODO(machenbach): Make asan a configuration switch.
417 package_dsym_files=( 436 package_dsym_files=(
418 self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan') and 437 self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan') and
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 isolated_targets=isolated_targets, 486 isolated_targets=isolated_targets,
468 name='generate_build_files%s' % name_suffix) 487 name='generate_build_files%s' % name_suffix)
469 488
470 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix) 489 self.m.chromium.compile(compile_targets, name='compile%s' % name_suffix)
471 490
472 def download_and_unzip_build(self, mastername, buildername, update_step, 491 def download_and_unzip_build(self, mastername, buildername, update_step,
473 bot_db, build_archive_url=None, 492 bot_db, build_archive_url=None,
474 build_revision=None, override_bot_type=None): 493 build_revision=None, override_bot_type=None):
475 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ 494 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \
476 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) 495 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db)
496
477 # We only want to do this for tester bots (i.e. those which do not compile 497 # We only want to do this for tester bots (i.e. those which do not compile
478 # locally). 498 # locally).
479 bot_type = override_bot_type or bot_db.get_bot_config( 499 bot_type = override_bot_type or bot_db.get_bot_config(
480 mastername, buildername).get('bot_type') 500 mastername, buildername).get('bot_type')
481 if bot_type != 'tester': 501 if bot_type != 'tester':
482 return 502 return
483 503
484 # Protect against hard to debug mismatches between directory names 504 # Protect against hard to debug mismatches between directory names
485 # used to run tests from and extract build to. We've had several cases 505 # used to run tests from and extract build to. We've had several cases
486 # where a stale build directory was used on a tester, and the extracted 506 # where a stale build directory was used on a tester, and the extracted
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 self.m.swarming.default_user = requester 775 self.m.swarming.default_user = requester
756 776
757 patch_project = self.m.properties.get('patch_project') 777 patch_project = self.m.properties.get('patch_project')
758 if patch_project: 778 if patch_project:
759 self.m.swarming.add_default_tag('patch_project:%s' % patch_project) 779 self.m.swarming.add_default_tag('patch_project:%s' % patch_project)
760 else: 780 else:
761 self.m.swarming.default_priority = MASTER_SWARMING_PRIORITIES[mastername] 781 self.m.swarming.default_priority = MASTER_SWARMING_PRIORITIES[mastername]
762 self.m.swarming.add_default_tag('purpose:post-commit') 782 self.m.swarming.add_default_tag('purpose:post-commit')
763 self.m.swarming.add_default_tag('purpose:CI') 783 self.m.swarming.add_default_tag('purpose:CI')
764 784
765 def _build_gs_archive_url(self, mastername, master_config, buildername): 785 def _build_gs_archive_url(self, mastername, master_config, buildername, no_sym bol_save = False):
dimu1 2016/07/07 21:54:11 rename to saveSymbol or stripSymbol
766 """Returns the archive URL to pass to self.m.archive.zip_and_upload_build. 786 """Returns the archive URL to pass to self.m.archive.zip_and_upload_build.
767 787
768 Most builders on most masters use a standard format for the build archive 788 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 789 URL, but some builders on some masters may specify custom places to upload
770 builds to. These special cases include: 790 builds to. These special cases include:
771 'chromium.perf' or 'chromium.perf.fyi': 791 'chromium.perf' or 'chromium.perf.fyi':
772 Exclude the name of the master from the url. 792 Exclude the name of the master from the url.
773 'tryserver.chromium.perf', or 793 'tryserver.chromium.perf', or
774 linux_full_bisect_builder on 'tryserver.chromium.linux': 794 linux_full_bisect_builder on 'tryserver.chromium.linux':
775 Return None so that the archive url specified in factory_properties 795 Return None so that the archive url specified in factory_properties
776 (as set on the master's configuration) is used instead. 796 (as set on the master's configuration) is used instead.
777 """ 797 """
778 if mastername.startswith('chromium.perf'): 798 if mastername.startswith('chromium.perf'):
799 if no_symbol_save:
800 return self.m.archive.legacy_upload_url(
801 master_config.get('strip_build_gs_bucket'),
dimu1 2016/07/07 21:54:11 rename the bucket key
802 extra_url_components=None)
779 return self.m.archive.legacy_upload_url( 803 return self.m.archive.legacy_upload_url(
780 master_config.get('build_gs_bucket'), 804 master_config.get('build_gs_bucket'),
781 extra_url_components=None) 805 extra_url_components=None)
782 elif (mastername == 'tryserver.chromium.perf' or 806 elif (mastername == 'tryserver.chromium.perf' or
783 (mastername == 'tryserver.chromium.linux' and 807 (mastername == 'tryserver.chromium.linux' and
784 buildername == 'linux_full_bisect_builder')): 808 buildername == 'linux_full_bisect_builder')):
785 return None 809 return None
786 else: 810 else:
787 return self.m.archive.legacy_upload_url( 811 return self.m.archive.legacy_upload_url(
788 master_config.get('build_gs_bucket'), 812 master_config.get('build_gs_bucket'),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 def get_compile_targets_for_scripts(self): 853 def get_compile_targets_for_scripts(self):
830 return self.m.python( 854 return self.m.python(
831 name='get compile targets for scripts', 855 name='get compile targets for scripts',
832 script=self.m.path['checkout'].join( 856 script=self.m.path['checkout'].join(
833 'testing', 'scripts', 'get_compile_targets.py'), 857 'testing', 'scripts', 'get_compile_targets.py'),
834 args=[ 858 args=[
835 '--output', self.m.json.output(), 859 '--output', self.m.json.output(),
836 '--', 860 '--',
837 ] + self.get_common_args_for_scripts(), 861 ] + self.get_common_args_for_scripts(),
838 step_test_data=lambda: self.m.json.test_api.output({})) 862 step_test_data=lambda: self.m.json.test_api.output({}))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698