OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import logging | 6 import logging |
7 import os | 7 import os |
8 import pickle | 8 import pickle |
9 import re | 9 import re |
10 | 10 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 self._timeout_scale = None | 441 self._timeout_scale = None |
442 self._initializeTestControlAttributes(args) | 442 self._initializeTestControlAttributes(args) |
443 | 443 |
444 self._coverage_directory = None | 444 self._coverage_directory = None |
445 self._initializeTestCoverageAttributes(args) | 445 self._initializeTestCoverageAttributes(args) |
446 | 446 |
447 self._store_tombstones = False | 447 self._store_tombstones = False |
448 self._initializeTombstonesAttributes(args) | 448 self._initializeTombstonesAttributes(args) |
449 | 449 |
450 self._gs_results_bucket = None | 450 self._gs_results_bucket = None |
451 self._should_save_logcat = None | |
452 self._initializeLogAttributes(args) | 451 self._initializeLogAttributes(args) |
453 | 452 |
454 self._edit_shared_prefs = [] | 453 self._edit_shared_prefs = [] |
455 self._initializeEditPrefsAttributes(args) | 454 self._initializeEditPrefsAttributes(args) |
456 | 455 |
457 self._replace_system_package = None | 456 self._replace_system_package = None |
458 self._initializeReplaceSystemPackageAttributes(args) | 457 self._initializeReplaceSystemPackageAttributes(args) |
459 | 458 |
460 self._external_shard_index = args.test_launcher_shard_index | 459 self._external_shard_index = args.test_launcher_shard_index |
461 self._total_external_shards = args.test_launcher_total_shards | 460 self._total_external_shards = args.test_launcher_total_shards |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 self._ui_screenshot_dir = args.ui_screenshot_dir | 621 self._ui_screenshot_dir = args.ui_screenshot_dir |
623 | 622 |
624 def _initializeTestCoverageAttributes(self, args): | 623 def _initializeTestCoverageAttributes(self, args): |
625 self._coverage_directory = args.coverage_dir | 624 self._coverage_directory = args.coverage_dir |
626 | 625 |
627 def _initializeTombstonesAttributes(self, args): | 626 def _initializeTombstonesAttributes(self, args): |
628 self._store_tombstones = args.store_tombstones | 627 self._store_tombstones = args.store_tombstones |
629 | 628 |
630 def _initializeLogAttributes(self, args): | 629 def _initializeLogAttributes(self, args): |
631 self._gs_results_bucket = args.gs_results_bucket | 630 self._gs_results_bucket = args.gs_results_bucket |
632 self._should_save_logcat = bool(args.json_results_file) | |
633 | 631 |
634 def _initializeEditPrefsAttributes(self, args): | 632 def _initializeEditPrefsAttributes(self, args): |
635 if not hasattr(args, 'shared_prefs_file') or not args.shared_prefs_file: | 633 if not hasattr(args, 'shared_prefs_file') or not args.shared_prefs_file: |
636 return | 634 return |
637 if not isinstance(args.shared_prefs_file, str): | 635 if not isinstance(args.shared_prefs_file, str): |
638 logging.warning("Given non-string for a filepath") | 636 logging.warning("Given non-string for a filepath") |
639 return | 637 return |
640 self._edit_shared_prefs = shared_preference_utils.ExtractSettingsFromJson( | 638 self._edit_shared_prefs = shared_preference_utils.ExtractSettingsFromJson( |
641 args.shared_prefs_file) | 639 args.shared_prefs_file) |
642 | 640 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 | 682 |
685 @property | 683 @property |
686 def flags(self): | 684 def flags(self): |
687 return self._flags | 685 return self._flags |
688 | 686 |
689 @property | 687 @property |
690 def gs_results_bucket(self): | 688 def gs_results_bucket(self): |
691 return self._gs_results_bucket | 689 return self._gs_results_bucket |
692 | 690 |
693 @property | 691 @property |
694 def should_save_logcat(self): | |
695 return self._should_save_logcat | |
696 | |
697 @property | |
698 def package_info(self): | 692 def package_info(self): |
699 return self._package_info | 693 return self._package_info |
700 | 694 |
701 @property | 695 @property |
702 def render_results_dir(self): | 696 def render_results_dir(self): |
703 return self._render_results_dir | 697 return self._render_results_dir |
704 | 698 |
705 @property | 699 @property |
706 def replace_system_package(self): | 700 def replace_system_package(self): |
707 return self._replace_system_package | 701 return self._replace_system_package |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 | 836 |
843 @staticmethod | 837 @staticmethod |
844 def GenerateTestResults( | 838 def GenerateTestResults( |
845 result_code, result_bundle, statuses, start_ms, duration_ms): | 839 result_code, result_bundle, statuses, start_ms, duration_ms): |
846 return GenerateTestResults(result_code, result_bundle, statuses, | 840 return GenerateTestResults(result_code, result_bundle, statuses, |
847 start_ms, duration_ms) | 841 start_ms, duration_ms) |
848 | 842 |
849 #override | 843 #override |
850 def TearDown(self): | 844 def TearDown(self): |
851 pass | 845 pass |
OLD | NEW |