| 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 collections | 5 import collections |
| 6 import copy | 6 import copy |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import pickle | 9 import pickle |
| 10 import re | 10 import re |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 | 490 |
| 491 self._timeout_scale = None | 491 self._timeout_scale = None |
| 492 self._initializeTestControlAttributes(args) | 492 self._initializeTestControlAttributes(args) |
| 493 | 493 |
| 494 self._coverage_directory = None | 494 self._coverage_directory = None |
| 495 self._initializeTestCoverageAttributes(args) | 495 self._initializeTestCoverageAttributes(args) |
| 496 | 496 |
| 497 self._store_tombstones = False | 497 self._store_tombstones = False |
| 498 self._initializeTombstonesAttributes(args) | 498 self._initializeTombstonesAttributes(args) |
| 499 | 499 |
| 500 self._should_save_images = None |
| 500 self._should_save_logcat = None | 501 self._should_save_logcat = None |
| 501 self._initializeLogAttributes(args) | 502 self._initializeLogAttributes(args) |
| 502 | 503 |
| 503 def _initializeApkAttributes(self, args, error_func): | 504 def _initializeApkAttributes(self, args, error_func): |
| 504 if args.apk_under_test: | 505 if args.apk_under_test: |
| 505 apk_under_test_path = args.apk_under_test | 506 apk_under_test_path = args.apk_under_test |
| 506 if not args.apk_under_test.endswith('.apk'): | 507 if not args.apk_under_test.endswith('.apk'): |
| 507 apk_under_test_path = os.path.join( | 508 apk_under_test_path = os.path.join( |
| 508 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, | 509 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, |
| 509 '%s.apk' % args.apk_under_test) | 510 '%s.apk' % args.apk_under_test) |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 self._timeout_scale = args.timeout_scale or 1 | 668 self._timeout_scale = args.timeout_scale or 1 |
| 668 | 669 |
| 669 def _initializeTestCoverageAttributes(self, args): | 670 def _initializeTestCoverageAttributes(self, args): |
| 670 self._coverage_directory = args.coverage_dir | 671 self._coverage_directory = args.coverage_dir |
| 671 | 672 |
| 672 def _initializeTombstonesAttributes(self, args): | 673 def _initializeTombstonesAttributes(self, args): |
| 673 self._store_tombstones = args.store_tombstones | 674 self._store_tombstones = args.store_tombstones |
| 674 | 675 |
| 675 def _initializeLogAttributes(self, args): | 676 def _initializeLogAttributes(self, args): |
| 676 self._should_save_logcat = bool(args.json_results_file) | 677 self._should_save_logcat = bool(args.json_results_file) |
| 678 self._should_save_images = bool(args.json_results_file) |
| 677 | 679 |
| 678 @property | 680 @property |
| 679 def additional_apks(self): | 681 def additional_apks(self): |
| 680 return self._additional_apks | 682 return self._additional_apks |
| 681 | 683 |
| 682 @property | 684 @property |
| 683 def apk_under_test(self): | 685 def apk_under_test(self): |
| 684 return self._apk_under_test | 686 return self._apk_under_test |
| 685 | 687 |
| 686 @property | 688 @property |
| (...skipping 14 matching lines...) Expand all Loading... |
| 701 | 703 |
| 702 @property | 704 @property |
| 703 def driver_name(self): | 705 def driver_name(self): |
| 704 return self._driver_name | 706 return self._driver_name |
| 705 | 707 |
| 706 @property | 708 @property |
| 707 def flags(self): | 709 def flags(self): |
| 708 return self._flags | 710 return self._flags |
| 709 | 711 |
| 710 @property | 712 @property |
| 713 def should_save_images(self): |
| 714 return self._should_save_images |
| 715 |
| 716 @property |
| 711 def should_save_logcat(self): | 717 def should_save_logcat(self): |
| 712 return self._should_save_logcat | 718 return self._should_save_logcat |
| 713 | 719 |
| 714 @property | 720 @property |
| 715 def package_info(self): | 721 def package_info(self): |
| 716 return self._package_info | 722 return self._package_info |
| 717 | 723 |
| 718 @property | 724 @property |
| 719 def screenshot_dir(self): | 725 def screenshot_dir(self): |
| 720 return self._screenshot_dir | 726 return self._screenshot_dir |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 | 845 |
| 840 @staticmethod | 846 @staticmethod |
| 841 def GenerateTestResults( | 847 def GenerateTestResults( |
| 842 result_code, result_bundle, statuses, start_ms, duration_ms): | 848 result_code, result_bundle, statuses, start_ms, duration_ms): |
| 843 return GenerateTestResults(result_code, result_bundle, statuses, | 849 return GenerateTestResults(result_code, result_bundle, statuses, |
| 844 start_ms, duration_ms) | 850 start_ms, duration_ms) |
| 845 | 851 |
| 846 #override | 852 #override |
| 847 def TearDown(self): | 853 def TearDown(self): |
| 848 pass | 854 pass |
| OLD | NEW |