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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 tests.insert(0, steps.DiagnoseGomaTest()) | 315 tests.insert(0, steps.DiagnoseGomaTest()) |
316 tests_including_triggered.insert(0, steps.DiagnoseGomaTest()) | 316 tests_including_triggered.insert(0, steps.DiagnoseGomaTest()) |
317 | 317 |
318 return tests, tests_including_triggered | 318 return tests, tests_including_triggered |
319 | 319 |
320 def get_compile_targets(self, bot_config, bot_db, tests): | 320 def get_compile_targets(self, bot_config, bot_db, tests): |
321 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ | 321 assert isinstance(bot_db, bdb_module.BotConfigAndTestDB), \ |
322 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) | 322 "bot_db argument %r was not a BotConfigAndTestDB" % (bot_db) |
323 | 323 |
324 compile_targets = bot_config.get_compile_targets(self, bot_db, tests) | 324 compile_targets = bot_config.get_compile_targets(self, bot_db, tests) |
325 | 325 return sorted(set(compile_targets)) |
326 # Only add crash_service when we have explicit compile targets. | |
327 compile_targets = set(compile_targets) | |
328 if (self.m.platform.is_win and | |
329 compile_targets and | |
330 'all' not in compile_targets): | |
331 compile_targets.add('crash_service') | |
332 | |
333 return sorted(compile_targets) | |
334 | 326 |
335 def transient_check(self, update_step, command): | 327 def transient_check(self, update_step, command): |
336 """Runs command, checking for transience if this is a try job. | 328 """Runs command, checking for transience if this is a try job. |
337 | 329 |
338 * command is a function which takes an argument of type (str -> str), | 330 * command is a function which takes an argument of type (str -> str), |
339 which is a test name transformation (it adds "with patch" or "without | 331 which is a test name transformation (it adds "with patch" or "without |
340 patch") and runs the command. | 332 patch") and runs the command. |
341 * update_step is the bot_update step used for deapplying the patch. | 333 * update_step is the bot_update step used for deapplying the patch. |
342 """ | 334 """ |
343 if self.m.tryserver.is_tryserver: | 335 if self.m.tryserver.is_tryserver: |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 #TODO(prasadv): Remove this hack and implement specific functions | 549 #TODO(prasadv): Remove this hack and implement specific functions |
558 # at the point of call. | 550 # at the point of call. |
559 remove_system_webview = bot_config.get('remove_system_webview') | 551 remove_system_webview = bot_config.get('remove_system_webview') |
560 perf_setup = bot_config.matches_any_bot_id(lambda bot_id: | 552 perf_setup = bot_config.matches_any_bot_id(lambda bot_id: |
561 bot_id['mastername'].startswith('chromium.perf') or | 553 bot_id['mastername'].startswith('chromium.perf') or |
562 bot_id['mastername'].startswith('tryserver.chromium.perf')) | 554 bot_id['mastername'].startswith('tryserver.chromium.perf')) |
563 self.m.chromium_android.common_tests_setup_steps( | 555 self.m.chromium_android.common_tests_setup_steps( |
564 perf_setup=perf_setup, | 556 perf_setup=perf_setup, |
565 remove_system_webview=remove_system_webview) | 557 remove_system_webview=remove_system_webview) |
566 | 558 |
567 if self.m.platform.is_win: | |
568 self.m.chromium.crash_handler() | |
569 | |
570 try: | 559 try: |
571 yield | 560 yield |
572 finally: | 561 finally: |
573 if self.m.platform.is_win: | 562 if self.m.platform.is_win: |
574 self.m.chromium.process_dumps() | 563 self.m.chromium.process_dumps() |
575 | 564 |
576 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 565 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
577 if require_device_steps: | 566 if require_device_steps: |
578 self.m.chromium_android.common_tests_final_steps( | 567 self.m.chromium_android.common_tests_final_steps( |
579 logcat_gs_bucket='chromium-android') | 568 logcat_gs_bucket='chromium-android') |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 additional_names=additional_names, | 689 additional_names=additional_names, |
701 config_file_name=config_file_name, | 690 config_file_name=config_file_name, |
702 use_mb=use_mb, | 691 use_mb=use_mb, |
703 mb_mastername=mb_mastername, | 692 mb_mastername=mb_mastername, |
704 mb_buildername=mb_buildername, | 693 mb_buildername=mb_buildername, |
705 build_output_dir=build_output_dir, | 694 build_output_dir=build_output_dir, |
706 cros_board=self.m.chromium.c.TARGET_CROS_BOARD) | 695 cros_board=self.m.chromium.c.TARGET_CROS_BOARD) |
707 | 696 |
708 compile_targets = self.m.filter.compile_targets[:] | 697 compile_targets = self.m.filter.compile_targets[:] |
709 | 698 |
710 # Add crash_service to compile_targets. This is done after filtering compile | |
711 # targets out because crash_service should always be there on windows. | |
712 # TODO(akuegel): Need to solve this in a better way. crbug.com/478053 | |
713 if (self.m.platform.is_win and compile_targets and | |
714 'crash_service' not in compile_targets): | |
715 compile_targets.extend(['crash_service']) | |
716 | |
717 # Emit more detailed output useful for debugging. | 699 # Emit more detailed output useful for debugging. |
718 analyze_details = { | 700 analyze_details = { |
719 'test_targets': test_targets, | 701 'test_targets': test_targets, |
720 'additional_compile_targets': additional_compile_targets, | 702 'additional_compile_targets': additional_compile_targets, |
721 'self.m.filter.compile_targets': self.m.filter.compile_targets, | 703 'self.m.filter.compile_targets': self.m.filter.compile_targets, |
722 'self.m.filter.test_targets': self.m.filter.test_targets, | 704 'self.m.filter.test_targets': self.m.filter.test_targets, |
723 'compile_targets': compile_targets, | 705 'compile_targets': compile_targets, |
724 } | 706 } |
725 with contextlib.closing(recipe_util.StringListIO()) as listio: | 707 with contextlib.closing(recipe_util.StringListIO()) as listio: |
726 json.dump(analyze_details, listio, indent=2, sort_keys=True) | 708 json.dump(analyze_details, listio, indent=2, sort_keys=True) |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 def get_compile_targets_for_scripts(self): | 822 def get_compile_targets_for_scripts(self): |
841 return self.m.python( | 823 return self.m.python( |
842 name='get compile targets for scripts', | 824 name='get compile targets for scripts', |
843 script=self.m.path['checkout'].join( | 825 script=self.m.path['checkout'].join( |
844 'testing', 'scripts', 'get_compile_targets.py'), | 826 'testing', 'scripts', 'get_compile_targets.py'), |
845 args=[ | 827 args=[ |
846 '--output', self.m.json.output(), | 828 '--output', self.m.json.output(), |
847 '--', | 829 '--', |
848 ] + self.get_common_args_for_scripts(), | 830 ] + self.get_common_args_for_scripts(), |
849 step_test_data=lambda: self.m.json.test_api.output({})) | 831 step_test_data=lambda: self.m.json.test_api.output({})) |
OLD | NEW |