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() | |
280 for package_info in constants.PACKAGE_INFO.itervalues(): | 279 for package_info in constants.PACKAGE_INFO.itervalues(): |
281 if package_under_test == package_info.package: | 280 if self._test_package == package_info.test_package: |
282 self._package_info = package_info | 281 self._package_info = package_info |
283 if not self._package_info: | 282 if not self._package_info: |
284 logging.warning('Unable to find package info for %s', self._test_package) | 283 logging.warning('Unable to find package info for %s', self._test_package) |
285 | 284 |
286 for apk in args.additional_apks: | 285 for apk in args.additional_apks: |
287 if not os.path.exists(apk): | 286 if not os.path.exists(apk): |
288 error_func('Unable to find additional APK: %s' % apk) | 287 error_func('Unable to find additional APK: %s' % apk) |
289 self._additional_apks = ( | 288 self._additional_apks = ( |
290 [apk_helper.ToHelper(x) for x in args.additional_apks]) | 289 [apk_helper.ToHelper(x) for x in args.additional_apks]) |
291 | 290 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 def GenerateTestResults( | 635 def GenerateTestResults( |
637 result_code, result_bundle, statuses, start_ms, duration_ms): | 636 result_code, result_bundle, statuses, start_ms, duration_ms): |
638 return GenerateTestResults(result_code, result_bundle, statuses, | 637 return GenerateTestResults(result_code, result_bundle, statuses, |
639 start_ms, duration_ms) | 638 start_ms, duration_ms) |
640 | 639 |
641 #override | 640 #override |
642 def TearDown(self): | 641 def TearDown(self): |
643 if self._isolate_delegate: | 642 if self._isolate_delegate: |
644 self._isolate_delegate.Clear() | 643 self._isolate_delegate.Clear() |
645 | 644 |
OLD | NEW |