| 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 itertools | 7 import itertools |
| 8 import json | 8 import json |
| 9 | 9 |
| 10 from recipe_engine.types import freeze | 10 from recipe_engine.types import freeze |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 # 'compile' just prepares all information needed for the isolation, | 392 # 'compile' just prepares all information needed for the isolation, |
| 393 # and the isolation is a separate step. | 393 # and the isolation is a separate step. |
| 394 self.m.isolate.isolate_tests( | 394 self.m.isolate.isolate_tests( |
| 395 self.m.chromium.output_dir, | 395 self.m.chromium.output_dir, |
| 396 targets=list(set(isolated_targets)), | 396 targets=list(set(isolated_targets)), |
| 397 verbose=True, | 397 verbose=True, |
| 398 set_swarm_hashes=False) | 398 set_swarm_hashes=False) |
| 399 | 399 |
| 400 def archive_build(self, mastername, buildername, update_step, bot_db): | 400 def archive_build(self, mastername, buildername, update_step, bot_db): |
| 401 bot_config = bot_db.get_bot_config(mastername, buildername) | 401 bot_config = bot_db.get_bot_config(mastername, buildername) |
| 402 | |
| 403 if bot_config.get('bot_type') == 'builder': | 402 if bot_config.get('bot_type') == 'builder': |
| 404 if not bot_config.get('cf_archive_build'): | 403 if not bot_config.get('cf_archive_build'): |
| 405 master_config = bot_db.get_master_settings(mastername) | 404 master_config = bot_db.get_master_settings(mastername) |
| 406 build_revision = update_step.presentation.properties['got_revision'] | 405 build_revision = update_step.presentation.properties['got_revision'] |
| 407 | |
| 408 # For archiving 'chromium.perf', the builder also archives a version | 406 # For archiving 'chromium.perf', the builder also archives a version |
| 409 # without perf test files for manual bisect. | 407 # without perf test files for manual bisect. |
| 410 # (https://bugs.chromium.org/p/chromium/issues/detail?id=604452) | 408 # (https://bugs.chromium.org/p/chromium/issues/detail?id=604452) |
| 411 if (master_config.get('bisect_builders') and | 409 if (master_config.get('bisect_builders') and |
| 412 buildername in master_config.get('bisect_builders')): | 410 buildername in master_config.get('bisect_builders')): |
| 411 include_list, strip_list, whitelist = None, None, None |
| 412 if buildername in master_config.get('bisect_include_files'): |
| 413 include_list = (master_config.get('bisect_include_files') |
| 414 [buildername]) |
| 415 if buildername in master_config.get('bisect_strip_files'): |
| 416 strip_list = master_config.get('bisect_strip_files')[buildername] |
| 417 if buildername in master_config.get('bisect_whitelist'): |
| 418 whitelist = master_config.get('bisect_whitelist')[buildername] |
| 413 self.m.archive.zip_and_upload_build( | 419 self.m.archive.zip_and_upload_build( |
| 414 'package build for bisect', | 420 'package build for bisect', |
| 415 self.m.chromium.c.build_config_fs, | 421 self.m.chromium.c.build_config_fs, |
| 416 build_url=self._build_bisect_gs_archive_url(master_config), | 422 build_url=self._build_bisect_gs_archive_url(master_config), |
| 417 build_revision=build_revision, | 423 build_revision=build_revision, |
| 418 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, | 424 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, |
| 419 update_properties=update_step.presentation.properties, | 425 update_properties=update_step.presentation.properties, |
| 420 exclude_perf_test_files=True, | 426 exclude_perf_test_files=True, |
| 427 include_bisect_file_list=include_list, |
| 428 include_bisect_strip_list=strip_list, |
| 429 include_bisect_whitelist=whitelist, |
| 421 store_by_hash=False | 430 store_by_hash=False |
| 422 ) | 431 ) |
| 423 | 432 |
| 424 self.m.archive.zip_and_upload_build( | 433 self.m.archive.zip_and_upload_build( |
| 425 'package build', | 434 'package build', |
| 426 self.m.chromium.c.build_config_fs, | 435 self.m.chromium.c.build_config_fs, |
| 427 build_url=self._build_gs_archive_url( | 436 build_url=self._build_gs_archive_url( |
| 428 mastername, master_config, buildername), | 437 mastername, master_config, buildername), |
| 429 build_revision=build_revision, | 438 build_revision=build_revision, |
| 430 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, | 439 cros_board=self.m.chromium.c.TARGET_CROS_BOARD, |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 812 |
| 804 if not tests: | 813 if not tests: |
| 805 return | 814 return |
| 806 | 815 |
| 807 api.chromium_swarming.configure_swarming( | 816 api.chromium_swarming.configure_swarming( |
| 808 'chromium', precommit=False, mastername=mastername) | 817 'chromium', precommit=False, mastername=mastername) |
| 809 test_runner = api.chromium_tests.create_test_runner( | 818 test_runner = api.chromium_tests.create_test_runner( |
| 810 api, tests, serialize_tests=bot_config.get('serialize_tests')) | 819 api, tests, serialize_tests=bot_config.get('serialize_tests')) |
| 811 with api.chromium_tests.wrap_chromium_tests(bot_config, tests): | 820 with api.chromium_tests.wrap_chromium_tests(bot_config, tests): |
| 812 test_runner() | 821 test_runner() |
| OLD | NEW |