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 infra.libs.infra_types import freeze | 5 from infra.libs.infra_types import freeze |
6 from slave import recipe_api | 6 from slave import recipe_api |
7 from slave.recipe_modules.webrtc import builders | 7 from slave.recipe_modules.webrtc import builders |
8 | 8 |
9 | 9 |
10 class WebRTCApi(recipe_api.RecipeApi): | 10 class WebRTCApi(recipe_api.RecipeApi): |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 build_revision=self.revision) | 414 build_revision=self.revision) |
415 | 415 |
416 def extract_build(self): | 416 def extract_build(self): |
417 if not self.m.properties.get('parent_got_revision'): | 417 if not self.m.properties.get('parent_got_revision'): |
418 raise self.m.step.StepFailure( | 418 raise self.m.step.StepFailure( |
419 'Testers cannot be forced without providing revision information.' | 419 'Testers cannot be forced without providing revision information.' |
420 'Please select a previous build and click [Rebuild] or force a build' | 420 'Please select a previous build and click [Rebuild] or force a build' |
421 'for a Builder instead (will trigger new runs for the testers).') | 421 'for a Builder instead (will trigger new runs for the testers).') |
422 | 422 |
423 # Ensure old build directory is not used is by removing it. | 423 # Ensure old build directory is not used is by removing it. |
424 self.m.path.rmtree( | 424 self.m.file.rmtree( |
425 'build directory', | 425 'build directory', |
426 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) | 426 self.m.chromium.c.build_dir.join(self.m.chromium.c.build_config_fs)) |
427 | 427 |
428 self.m.archive.download_and_unzip_build( | 428 self.m.archive.download_and_unzip_build( |
429 'extract build', | 429 'extract build', |
430 self.m.chromium.c.build_config_fs, | 430 self.m.chromium.c.build_config_fs, |
431 self.GS_ARCHIVES[self.bot_config['build_gs_archive']], | 431 self.GS_ARCHIVES[self.bot_config['build_gs_archive']], |
432 build_revision=self.revision) | 432 build_revision=self.revision) |
433 | 433 |
434 def cleanup(self): | 434 def cleanup(self): |
435 self.clean_test_output() | 435 self.clean_test_output() |
436 if self.m.chromium.c.TARGET_PLATFORM == 'android': | 436 if self.m.chromium.c.TARGET_PLATFORM == 'android': |
437 self.m.chromium_android.clean_local_files() | 437 self.m.chromium_android.clean_local_files() |
438 else: | 438 else: |
439 self.m.chromium.cleanup_temp() | 439 self.m.chromium.cleanup_temp() |
440 | 440 |
441 def clean_test_output(self): | 441 def clean_test_output(self): |
442 """Remove all test output in out/, since we have tests leaking files.""" | 442 """Remove all test output in out/, since we have tests leaking files.""" |
443 out_dir = self.m.path['checkout'].join('out') | 443 out_dir = self.m.path['checkout'].join('out') |
444 self.m.python('clean test output files', | 444 self.m.python('clean test output files', |
445 script=self.resource('cleanup_files.py'), | 445 script=self.resource('cleanup_files.py'), |
446 args=[out_dir], | 446 args=[out_dir], |
447 infra_step=True) | 447 infra_step=True) |
448 | 448 |
449 def virtual_webcam_check(self): | 449 def virtual_webcam_check(self): |
450 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) | 450 self.m.python('webcam_check', self.resource('ensure_webcam_is_running.py')) |
OLD | NEW |