| OLD | NEW | 
|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 logging | 5 import logging | 
| 6 import os | 6 import os | 
| 7 import re | 7 import re | 
| 8 import shutil | 8 import shutil | 
| 9 import sys | 9 import sys | 
| 10 import tempfile | 10 import tempfile | 
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138     if not os.path.exists(self._apk_path): | 138     if not os.path.exists(self._apk_path): | 
| 139       self._apk_path = None | 139       self._apk_path = None | 
| 140       self._activity = None | 140       self._activity = None | 
| 141       self._package = None | 141       self._package = None | 
| 142       self._runner = None | 142       self._runner = None | 
| 143     else: | 143     else: | 
| 144       helper = apk_helper.ApkHelper(self._apk_path) | 144       helper = apk_helper.ApkHelper(self._apk_path) | 
| 145       self._activity = helper.GetActivityName() | 145       self._activity = helper.GetActivityName() | 
| 146       self._package = helper.GetPackageName() | 146       self._package = helper.GetPackageName() | 
| 147       self._runner = helper.GetInstrumentationName() | 147       self._runner = helper.GetInstrumentationName() | 
|  | 148       self._permissions = helper.GetPermissions() | 
| 148       self._extras = { | 149       self._extras = { | 
| 149         _EXTRA_NATIVE_TEST_ACTIVITY: self._activity, | 150         _EXTRA_NATIVE_TEST_ACTIVITY: self._activity, | 
| 150       } | 151       } | 
| 151       if self._suite in BROWSER_TEST_SUITES: | 152       if self._suite in BROWSER_TEST_SUITES: | 
| 152         self._extras[_EXTRA_SHARD_SIZE_LIMIT] = 1 | 153         self._extras[_EXTRA_SHARD_SIZE_LIMIT] = 1 | 
| 153 | 154 | 
| 154     if not os.path.exists(self._exe_path): | 155     if not os.path.exists(self._exe_path): | 
| 155       self._exe_path = None | 156       self._exe_path = None | 
| 156     if not self._apk_path and not self._exe_path: | 157     if not self._apk_path and not self._exe_path: | 
| 157       error_func('Could not find apk or executable for %s' % self._suite) | 158       error_func('Could not find apk or executable for %s' % self._suite) | 
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 313 | 314 | 
| 314   @property | 315   @property | 
| 315   def extras(self): | 316   def extras(self): | 
| 316     return self._extras | 317     return self._extras | 
| 317 | 318 | 
| 318   @property | 319   @property | 
| 319   def package(self): | 320   def package(self): | 
| 320     return self._package | 321     return self._package | 
| 321 | 322 | 
| 322   @property | 323   @property | 
|  | 324   def permissions(self): | 
|  | 325     return self._permissions | 
|  | 326 | 
|  | 327   @property | 
| 323   def runner(self): | 328   def runner(self): | 
| 324     return self._runner | 329     return self._runner | 
| 325 | 330 | 
| 326   @property | 331   @property | 
| 327   def suite(self): | 332   def suite(self): | 
| 328     return self._suite | 333     return self._suite | 
| 329 | 334 | 
| OLD | NEW | 
|---|