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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 | 269 |
270 if not os.path.exists(self._test_apk.path): | 270 if not os.path.exists(self._test_apk.path): |
271 error_func('Unable to find test APK: %s' % self._test_apk.path) | 271 error_func('Unable to find test APK: %s' % self._test_apk.path) |
272 if not os.path.exists(self._test_jar): | 272 if not os.path.exists(self._test_jar): |
273 error_func('Unable to find test JAR: %s' % self._test_jar) | 273 error_func('Unable to find test JAR: %s' % self._test_jar) |
274 | 274 |
275 self._test_package = self._test_apk.GetPackageName() | 275 self._test_package = self._test_apk.GetPackageName() |
276 self._test_runner = self._test_apk.GetInstrumentationName() | 276 self._test_runner = self._test_apk.GetInstrumentationName() |
277 | 277 |
278 self._package_info = None | 278 self._package_info = None |
279 package_under_test = self._apk_under_test.GetPackageName() | |
279 for package_info in constants.PACKAGE_INFO.itervalues(): | 280 for package_info in constants.PACKAGE_INFO.itervalues(): |
280 if self._test_package == package_info.test_package: | 281 if package_under_test == package_info.package: |
rnephew (Reviews Here)
2016/04/15 20:35:36
In this context:
package_under_test == chrome
mikecase (-- gone --)
2016/04/15 20:55:36
Yeah, so for example. In the case of like ChromeTe
| |
281 self._package_info = package_info | 282 self._package_info = package_info |
282 if not self._package_info: | 283 if not self._package_info: |
283 logging.warning('Unable to find package info for %s', self._test_package) | 284 logging.warning('Unable to find package info for %s', self._test_package) |
284 | 285 |
285 for apk in args.additional_apks: | 286 for apk in args.additional_apks: |
286 if not os.path.exists(apk): | 287 if not os.path.exists(apk): |
287 error_func('Unable to find additional APK: %s' % apk) | 288 error_func('Unable to find additional APK: %s' % apk) |
288 self._additional_apks = ( | 289 self._additional_apks = ( |
289 [apk_helper.ToHelper(x) for x in args.additional_apks]) | 290 [apk_helper.ToHelper(x) for x in args.additional_apks]) |
290 | 291 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
635 def GenerateTestResults( | 636 def GenerateTestResults( |
636 result_code, result_bundle, statuses, start_ms, duration_ms): | 637 result_code, result_bundle, statuses, start_ms, duration_ms): |
637 return GenerateTestResults(result_code, result_bundle, statuses, | 638 return GenerateTestResults(result_code, result_bundle, statuses, |
638 start_ms, duration_ms) | 639 start_ms, duration_ms) |
639 | 640 |
640 #override | 641 #override |
641 def TearDown(self): | 642 def TearDown(self): |
642 if self._isolate_delegate: | 643 if self._isolate_delegate: |
643 self._isolate_delegate.Clear() | 644 self._isolate_delegate.Clear() |
644 | 645 |
OLD | NEW |