| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 """Defines TestPackageApk to help run APK-based native tests.""" | 5 """Defines TestPackageApk to help run APK-based native tests.""" |
| 6 # pylint: disable=W0212 | 6 # pylint: disable=W0212 |
| 7 | 7 |
| 8 import itertools | 8 import itertools |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| 11 import posixpath | 11 import posixpath |
| 12 import shlex | 12 import shlex |
| 13 import sys | 13 import sys |
| 14 import tempfile | 14 import tempfile |
| 15 import time | 15 import time |
| 16 | 16 |
| 17 from devil.android import device_errors |
| 18 from devil.android.sdk import intent |
| 17 from pylib import constants | 19 from pylib import constants |
| 18 from pylib import pexpect | 20 from pylib import pexpect |
| 19 from pylib.device import device_errors | |
| 20 from pylib.device import intent | |
| 21 from pylib.gtest import gtest_test_instance | 21 from pylib.gtest import gtest_test_instance |
| 22 from pylib.gtest import local_device_gtest_run | 22 from pylib.gtest import local_device_gtest_run |
| 23 from pylib.gtest.test_package import TestPackage | 23 from pylib.gtest.test_package import TestPackage |
| 24 | 24 |
| 25 | 25 |
| 26 class TestPackageApk(TestPackage): | 26 class TestPackageApk(TestPackage): |
| 27 """A helper class for running APK-based native tests.""" | 27 """A helper class for running APK-based native tests.""" |
| 28 | 28 |
| 29 def __init__(self, suite_name): | 29 def __init__(self, suite_name): |
| 30 """ | 30 """ |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 #override | 158 #override |
| 159 def Install(self, device): | 159 def Install(self, device): |
| 160 self.tool.CopyFiles(device) | 160 self.tool.CopyFiles(device) |
| 161 device.Install(self.suite_path) | 161 device.Install(self.suite_path) |
| 162 | 162 |
| 163 #override | 163 #override |
| 164 def PullAppFiles(self, device, files, directory): | 164 def PullAppFiles(self, device, files, directory): |
| 165 local_device_gtest_run.PullAppFilesImpl( | 165 local_device_gtest_run.PullAppFilesImpl( |
| 166 device, self._package_info.package, files, directory) | 166 device, self._package_info.package, files, directory) |
| OLD | NEW |