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 copy | 5 import copy |
| 6 | 6 |
| 7 from slave import recipe_api | 7 from slave import recipe_api |
| 8 | 8 |
| 9 | 9 |
| 10 # Different types of builds this recipe module can do. | 10 # Different types of builds this recipe module can do. |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 tests = bot_config.get('tests', []) | 214 tests = bot_config.get('tests', []) |
| 215 if override_tests is not None: | 215 if override_tests is not None: |
| 216 tests = override_tests | 216 tests = override_tests |
| 217 | 217 |
| 218 self.m.chromium.cleanup_temp() | 218 self.m.chromium.cleanup_temp() |
| 219 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 219 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
| 220 self.m.chromium_android.clean_local_files() | 220 self.m.chromium_android.clean_local_files() |
| 221 | 221 |
| 222 if bot_type in ['builder', 'builder_tester']: | 222 if bot_type in ['builder', 'builder_tester']: |
| 223 compile_targets = set(bot_config.get('compile_targets', [])) | 223 compile_targets = set(bot_config.get('compile_targets', [])) |
| 224 for test in tests: | 224 tests_including_triggered = copy.copy(tests) |
|
M-A Ruel
2014/09/24 19:37:00
tests_including_triggered = tests[:]
jam
2014/09/24 19:47:37
Done.
| |
| 225 compile_targets.update(test.compile_targets(self.m)) | |
| 226 for loop_buildername, builder_dict in master_dict.get( | 225 for loop_buildername, builder_dict in master_dict.get( |
| 227 'builders', {}).iteritems(): | 226 'builders', {}).iteritems(): |
| 228 if builder_dict.get('parent_buildername') == buildername: | 227 if builder_dict.get('parent_buildername') == buildername: |
| 229 for test in builder_dict.get('tests', []): | 228 for test in builder_dict.get('tests', []): |
| 230 compile_targets.update(test.compile_targets(self.m)) | 229 tests_including_triggered.append(test) |
| 230 | |
| 231 for t in tests_including_triggered: | |
| 232 compile_targets.update(t.compile_targets(self.m)) | |
| 231 | 233 |
| 232 self.m.chromium.compile(targets=sorted(compile_targets)) | 234 self.m.chromium.compile(targets=sorted(compile_targets)) |
| 233 self.m.chromium.checkdeps() | 235 self.m.chromium.checkdeps() |
| 234 | 236 |
| 235 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 237 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
| 236 self.m.chromium_android.check_webview_licenses() | 238 self.m.chromium_android.check_webview_licenses() |
| 237 self.m.chromium_android.findbugs() | 239 self.m.chromium_android.findbugs() |
| 238 | 240 |
| 239 has_swarming_tests = any(t.uses_swarming for t in tests) | 241 isolated_targets = [t.name for t in tests_including_triggered \ |
|
M-A Ruel
2014/09/24 19:37:00
isolated_targets = [
t.name for t in tests_inclu
jam
2014/09/24 19:47:37
Done.
| |
| 240 if bot_config.get('use_isolate'): | 242 if t.uses_swarming] |
| 241 self.m.isolate.find_isolated_tests(self.m.chromium.output_dir) | 243 if isolated_targets: |
| 242 # TODO(phajdan.jr): Always use the below codepath once fully tested. | |
| 243 elif has_swarming_tests: | |
| 244 isolated_targets = [t.name for t in tests if t.uses_swarming] | |
| 245 self.m.isolate.find_isolated_tests( | 244 self.m.isolate.find_isolated_tests( |
| 246 self.m.chromium.output_dir, targets=list(set(isolated_targets))) | 245 self.m.chromium.output_dir, targets=list(set(isolated_targets))) |
| 247 | 246 |
| 248 got_revision = update_step.presentation.properties['got_revision'] | 247 got_revision = update_step.presentation.properties['got_revision'] |
| 249 | 248 |
| 250 if bot_type == 'builder': | 249 if bot_type == 'builder': |
| 251 if mastername == 'chromium.linux': | 250 if mastername == 'chromium.linux': |
| 252 # TODO(samuong): This is restricted to Linux for now until I have more | 251 # TODO(samuong): This is restricted to Linux for now until I have more |
| 253 # confidence that it is not totally broken. | 252 # confidence that it is not totally broken. |
| 254 self.m.archive.archive_dependencies( | 253 self.m.archive.archive_dependencies( |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 self.m.chromium.crash_handler() | 316 self.m.chromium.crash_handler() |
| 318 | 317 |
| 319 try: | 318 try: |
| 320 return test_runner() | 319 return test_runner() |
| 321 finally: | 320 finally: |
| 322 if self.m.platform.is_win: | 321 if self.m.platform.is_win: |
| 323 self.m.chromium.process_dumps() | 322 self.m.chromium.process_dumps() |
| 324 | 323 |
| 325 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 324 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
| 326 self.m.chromium_android.common_tests_final_steps() | 325 self.m.chromium_android.common_tests_final_steps() |
| OLD | NEW |