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 json | 7 import json |
8 import logging | 8 import logging |
9 import os | 9 import os |
10 import pickle | 10 import pickle |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 497 |
498 self._store_tombstones = False | 498 self._store_tombstones = False |
499 self._initializeTombstonesAttributes(args) | 499 self._initializeTombstonesAttributes(args) |
500 | 500 |
501 self._should_save_logcat = None | 501 self._should_save_logcat = None |
502 self._initializeLogAttributes(args) | 502 self._initializeLogAttributes(args) |
503 | 503 |
504 self._edit_shared_prefs = [] | 504 self._edit_shared_prefs = [] |
505 self._initializeEditPrefsAttributes(args) | 505 self._initializeEditPrefsAttributes(args) |
506 | 506 |
| 507 self._external_shard_index = args.test_launcher_shard_index |
| 508 self._total_external_shards = args.test_launcher_total_shards |
| 509 |
507 def _initializeApkAttributes(self, args, error_func): | 510 def _initializeApkAttributes(self, args, error_func): |
508 if args.apk_under_test: | 511 if args.apk_under_test: |
509 apk_under_test_path = args.apk_under_test | 512 apk_under_test_path = args.apk_under_test |
510 if not args.apk_under_test.endswith('.apk'): | 513 if not args.apk_under_test.endswith('.apk'): |
511 apk_under_test_path = os.path.join( | 514 apk_under_test_path = os.path.join( |
512 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, | 515 constants.GetOutDirectory(), constants.SDK_BUILD_APKS_DIR, |
513 '%s.apk' % args.apk_under_test) | 516 '%s.apk' % args.apk_under_test) |
514 | 517 |
515 # TODO(jbudorick): Move the realpath up to the argument parser once | 518 # TODO(jbudorick): Move the realpath up to the argument parser once |
516 # APK-by-name is no longer supported. | 519 # APK-by-name is no longer supported. |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 730 |
728 @property | 731 @property |
729 def driver_name(self): | 732 def driver_name(self): |
730 return self._driver_name | 733 return self._driver_name |
731 | 734 |
732 @property | 735 @property |
733 def edit_shared_prefs(self): | 736 def edit_shared_prefs(self): |
734 return self._edit_shared_prefs | 737 return self._edit_shared_prefs |
735 | 738 |
736 @property | 739 @property |
| 740 def external_shard_index(self): |
| 741 return self._external_shard_index |
| 742 |
| 743 @property |
737 def flags(self): | 744 def flags(self): |
738 return self._flags | 745 return self._flags |
739 | 746 |
740 @property | 747 @property |
741 def should_save_logcat(self): | 748 def should_save_logcat(self): |
742 return self._should_save_logcat | 749 return self._should_save_logcat |
743 | 750 |
744 @property | 751 @property |
745 def package_info(self): | 752 def package_info(self): |
746 return self._package_info | 753 return self._package_info |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 return self._test_runner | 789 return self._test_runner |
783 | 790 |
784 @property | 791 @property |
785 def test_runner_junit4(self): | 792 def test_runner_junit4(self): |
786 return self._test_runner_junit4 | 793 return self._test_runner_junit4 |
787 | 794 |
788 @property | 795 @property |
789 def timeout_scale(self): | 796 def timeout_scale(self): |
790 return self._timeout_scale | 797 return self._timeout_scale |
791 | 798 |
| 799 @property |
| 800 def total_external_shards(self): |
| 801 return self._total_external_shards |
| 802 |
792 #override | 803 #override |
793 def TestType(self): | 804 def TestType(self): |
794 return 'instrumentation' | 805 return 'instrumentation' |
795 | 806 |
796 #override | 807 #override |
797 def SetUp(self): | 808 def SetUp(self): |
798 self._data_deps.extend( | 809 self._data_deps.extend( |
799 self._data_deps_delegate(self._runtime_deps_path)) | 810 self._data_deps_delegate(self._runtime_deps_path)) |
800 | 811 |
801 def GetDataDependencies(self): | 812 def GetDataDependencies(self): |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 | 880 |
870 @staticmethod | 881 @staticmethod |
871 def GenerateTestResults( | 882 def GenerateTestResults( |
872 result_code, result_bundle, statuses, start_ms, duration_ms): | 883 result_code, result_bundle, statuses, start_ms, duration_ms): |
873 return GenerateTestResults(result_code, result_bundle, statuses, | 884 return GenerateTestResults(result_code, result_bundle, statuses, |
874 start_ms, duration_ms) | 885 start_ms, duration_ms) |
875 | 886 |
876 #override | 887 #override |
877 def TearDown(self): | 888 def TearDown(self): |
878 pass | 889 pass |
OLD | NEW |