| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from recipe_engine.types import freeze | 5 from recipe_engine.types import freeze |
| 6 from recipe_engine import recipe_api | 6 from recipe_engine import recipe_api |
| 7 from . import builders | 7 from . import builders |
| 8 from . import steps | 8 from . import steps |
| 9 | 9 |
| 10 | 10 |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 with self.m.step.defer_results(): | 226 with self.m.step.defer_results(): |
| 227 if tests: | 227 if tests: |
| 228 run_android_device_steps = (not self.c.enable_swarming and | 228 run_android_device_steps = (not self.c.enable_swarming and |
| 229 self.m.chromium.c.TARGET_PLATFORM == 'android' and | 229 self.m.chromium.c.TARGET_PLATFORM == 'android' and |
| 230 self.c.TEST_SUITE != 'android_swarming') | 230 self.c.TEST_SUITE != 'android_swarming') |
| 231 | 231 |
| 232 if run_android_device_steps: | 232 if run_android_device_steps: |
| 233 self.m.chromium_android.common_tests_setup_steps() | 233 self.m.chromium_android.common_tests_setup_steps() |
| 234 | 234 |
| 235 for test in tests: | 235 for test in tests: |
| 236 test.pre_run(self, suffix='') | 236 test.pre_run(self.m, suffix='') |
| 237 | 237 |
| 238 for test in tests: | 238 for test in tests: |
| 239 test.run(self, suffix='') | 239 test.run(self, suffix='') |
| 240 | 240 |
| 241 for test in tests: | 241 for test in tests: |
| 242 test.post_run(self, suffix='') | 242 test.post_run(self.m, suffix='') |
| 243 | 243 |
| 244 if run_android_device_steps: | 244 if run_android_device_steps: |
| 245 self.m.chromium_android.shutdown_device_monitor() | 245 self.m.chromium_android.shutdown_device_monitor() |
| 246 self.m.chromium_android.logcat_dump( | 246 self.m.chromium_android.logcat_dump( |
| 247 gs_bucket=self.master_config.get('build_gs_bucket')) | 247 gs_bucket=self.master_config.get('build_gs_bucket')) |
| 248 self.m.chromium_android.stack_tool_steps(force_latest_version=True) | 248 self.m.chromium_android.stack_tool_steps(force_latest_version=True) |
| 249 self.m.chromium_android.test_report() | 249 self.m.chromium_android.test_report() |
| 250 | 250 |
| 251 with self.m.step.defer_results(): | |
| 252 for test in tests: | |
| 253 if test.enable_swarming: | |
| 254 self.m.swarming.collect_task(test.swarming_task) | |
| 255 | |
| 256 | 251 |
| 257 def add_test(self, test, name=None, args=None, revision=None, env=None, | 252 def add_test(self, test, name=None, args=None, revision=None, env=None, |
| 258 python_mode=False, perf_test=False, perf_dashboard_id=None, | 253 python_mode=False, perf_test=False, perf_dashboard_id=None, |
| 259 parallel=True): | 254 parallel=True): |
| 260 """Helper function to invoke chromium.runtest(). | 255 """Helper function to invoke chromium.runtest(). |
| 261 | 256 |
| 262 Notice that the name parameter should be the same as the test executable in | 257 Notice that the name parameter should be the same as the test executable in |
| 263 order to get the stdio links in the perf dashboard to become correct. | 258 order to get the stdio links in the perf dashboard to become correct. |
| 264 """ | 259 """ |
| 265 name = name or test | 260 name = name or test |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 def clean_test_output(self): | 366 def clean_test_output(self): |
| 372 """Remove all test output in out/, since we have tests leaking files.""" | 367 """Remove all test output in out/, since we have tests leaking files.""" |
| 373 out_dir = self.m.path['checkout'].join('out') | 368 out_dir = self.m.path['checkout'].join('out') |
| 374 self.m.python('clean test output files', | 369 self.m.python('clean test output files', |
| 375 script=self.resource('cleanup_files.py'), | 370 script=self.resource('cleanup_files.py'), |
| 376 args=[out_dir], | 371 args=[out_dir], |
| 377 infra_step=True) | 372 infra_step=True) |
| 378 | 373 |
| 379 def virtual_webcam_check(self): | 374 def virtual_webcam_check(self): |
| 380 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) | 375 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) |
| OLD | NEW |