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

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

Issue 1871583004: Revert "Remove references to crash_service, which is no longer needed." (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 8 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return sorted(set(compile_targets)) 325
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)
326 334
327 def transient_check(self, update_step, command): 335 def transient_check(self, update_step, command):
328 """Runs command, checking for transience if this is a try job. 336 """Runs command, checking for transience if this is a try job.
329 337
330 * command is a function which takes an argument of type (str -> str), 338 * command is a function which takes an argument of type (str -> str),
331 which is a test name transformation (it adds "with patch" or "without 339 which is a test name transformation (it adds "with patch" or "without
332 patch") and runs the command. 340 patch") and runs the command.
333 * update_step is the bot_update step used for deapplying the patch. 341 * update_step is the bot_update step used for deapplying the patch.
334 """ 342 """
335 if self.m.tryserver.is_tryserver: 343 if self.m.tryserver.is_tryserver:
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 #TODO(prasadv): Remove this hack and implement specific functions 557 #TODO(prasadv): Remove this hack and implement specific functions
550 # at the point of call. 558 # at the point of call.
551 remove_system_webview = bot_config.get('remove_system_webview') 559 remove_system_webview = bot_config.get('remove_system_webview')
552 perf_setup = bot_config.matches_any_bot_id(lambda bot_id: 560 perf_setup = bot_config.matches_any_bot_id(lambda bot_id:
553 bot_id['mastername'].startswith('chromium.perf') or 561 bot_id['mastername'].startswith('chromium.perf') or
554 bot_id['mastername'].startswith('tryserver.chromium.perf')) 562 bot_id['mastername'].startswith('tryserver.chromium.perf'))
555 self.m.chromium_android.common_tests_setup_steps( 563 self.m.chromium_android.common_tests_setup_steps(
556 perf_setup=perf_setup, 564 perf_setup=perf_setup,
557 remove_system_webview=remove_system_webview) 565 remove_system_webview=remove_system_webview)
558 566
567 if self.m.platform.is_win:
568 self.m.chromium.crash_handler()
569
559 try: 570 try:
560 yield 571 yield
561 finally: 572 finally:
562 if self.m.platform.is_win: 573 if self.m.platform.is_win:
563 self.m.chromium.process_dumps() 574 self.m.chromium.process_dumps()
564 575
565 if self.m.chromium.c.TARGET_PLATFORM == 'android': 576 if self.m.chromium.c.TARGET_PLATFORM == 'android':
566 if require_device_steps: 577 if require_device_steps:
567 self.m.chromium_android.common_tests_final_steps( 578 self.m.chromium_android.common_tests_final_steps(
568 logcat_gs_bucket='chromium-android') 579 logcat_gs_bucket='chromium-android')
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 additional_names=additional_names, 700 additional_names=additional_names,
690 config_file_name=config_file_name, 701 config_file_name=config_file_name,
691 use_mb=use_mb, 702 use_mb=use_mb,
692 mb_mastername=mb_mastername, 703 mb_mastername=mb_mastername,
693 mb_buildername=mb_buildername, 704 mb_buildername=mb_buildername,
694 build_output_dir=build_output_dir, 705 build_output_dir=build_output_dir,
695 cros_board=self.m.chromium.c.TARGET_CROS_BOARD) 706 cros_board=self.m.chromium.c.TARGET_CROS_BOARD)
696 707
697 compile_targets = self.m.filter.compile_targets[:] 708 compile_targets = self.m.filter.compile_targets[:]
698 709
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
699 # Emit more detailed output useful for debugging. 717 # Emit more detailed output useful for debugging.
700 analyze_details = { 718 analyze_details = {
701 'test_targets': test_targets, 719 'test_targets': test_targets,
702 'additional_compile_targets': additional_compile_targets, 720 'additional_compile_targets': additional_compile_targets,
703 'self.m.filter.compile_targets': self.m.filter.compile_targets, 721 'self.m.filter.compile_targets': self.m.filter.compile_targets,
704 'self.m.filter.test_targets': self.m.filter.test_targets, 722 'self.m.filter.test_targets': self.m.filter.test_targets,
705 'compile_targets': compile_targets, 723 'compile_targets': compile_targets,
706 } 724 }
707 with contextlib.closing(recipe_util.StringListIO()) as listio: 725 with contextlib.closing(recipe_util.StringListIO()) as listio:
708 json.dump(analyze_details, listio, indent=2, sort_keys=True) 726 json.dump(analyze_details, listio, indent=2, sort_keys=True)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 def get_compile_targets_for_scripts(self): 840 def get_compile_targets_for_scripts(self):
823 return self.m.python( 841 return self.m.python(
824 name='get compile targets for scripts', 842 name='get compile targets for scripts',
825 script=self.m.path['checkout'].join( 843 script=self.m.path['checkout'].join(
826 'testing', 'scripts', 'get_compile_targets.py'), 844 'testing', 'scripts', 'get_compile_targets.py'),
827 args=[ 845 args=[
828 '--output', self.m.json.output(), 846 '--output', self.m.json.output(),
829 '--', 847 '--',
830 ] + self.get_common_args_for_scripts(), 848 ] + self.get_common_args_for_scripts(),
831 step_test_data=lambda: self.m.json.test_api.output({})) 849 step_test_data=lambda: self.m.json.test_api.output({}))
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium/api.py ('k') | scripts/slave/recipe_modules/chromium_tests/chromium_fyi.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698