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 import logging | 5 import logging |
6 import os | 6 import os |
7 import re | 7 import re |
8 | 8 |
9 from pylib import constants | 9 from pylib import constants |
10 from pylib import pexpect | 10 from pylib import pexpect |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 self._timeout = timeout * self.tool.GetTimeoutScale() | 54 self._timeout = timeout * self.tool.GetTimeoutScale() |
55 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 55 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
56 self._perf_controller = perf_control.PerfControl(self.device) | 56 self._perf_controller = perf_control.PerfControl(self.device) |
57 | 57 |
58 #override | 58 #override |
59 def InstallTestPackage(self): | 59 def InstallTestPackage(self): |
60 self.test_package.Install(self.device) | 60 self.test_package.Install(self.device) |
61 | 61 |
62 #override | 62 #override |
63 def PushDataDeps(self): | 63 def PushDataDeps(self): |
64 self.device.old_interface.WaitForSdCardReady(20) | 64 self.device.WaitUntilFullyBooted(timeout=20) |
65 self.tool.CopyFiles() | 65 self.tool.CopyFiles() |
66 if os.path.exists(constants.ISOLATE_DEPS_DIR): | 66 if os.path.exists(constants.ISOLATE_DEPS_DIR): |
67 device_dir = self.device.old_interface.GetExternalStorage() | |
68 # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir | 67 # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir |
69 # as breakpad_unittests exe. Find a better way to do this. | 68 # as breakpad_unittests exe. Find a better way to do this. |
70 if self.test_package.suite_name == 'breakpad_unittests': | 69 if self.test_package.suite_name == 'breakpad_unittests': |
71 device_dir = constants.TEST_EXECUTABLE_DIR | 70 device_dir = constants.TEST_EXECUTABLE_DIR |
| 71 else: |
| 72 device_dir = self.device.GetExternalStoragePath() |
72 for p in os.listdir(constants.ISOLATE_DEPS_DIR): | 73 for p in os.listdir(constants.ISOLATE_DEPS_DIR): |
73 self.device.old_interface.PushIfNeeded( | 74 self.device.old_interface.PushIfNeeded( |
74 os.path.join(constants.ISOLATE_DEPS_DIR, p), | 75 os.path.join(constants.ISOLATE_DEPS_DIR, p), |
75 os.path.join(device_dir, p)) | 76 os.path.join(device_dir, p)) |
76 | 77 |
77 def _ParseTestOutput(self, p): | 78 def _ParseTestOutput(self, p): |
78 """Process the test output. | 79 """Process the test output. |
79 | 80 |
80 Args: | 81 Args: |
81 p: An instance of pexpect spawn class. | 82 p: An instance of pexpect spawn class. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 self.tool.SetupEnvironment() | 189 self.tool.SetupEnvironment() |
189 | 190 |
190 #override | 191 #override |
191 def TearDown(self): | 192 def TearDown(self): |
192 """Cleans up the test enviroment for the test suite.""" | 193 """Cleans up the test enviroment for the test suite.""" |
193 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 194 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
194 self._perf_controller.RestoreOriginalPerfMode() | 195 self._perf_controller.RestoreOriginalPerfMode() |
195 self.test_package.ClearApplicationState(self.device) | 196 self.test_package.ClearApplicationState(self.device) |
196 self.tool.CleanUpEnvironment() | 197 self.tool.CleanUpEnvironment() |
197 super(TestRunner, self).TearDown() | 198 super(TestRunner, self).TearDown() |
OLD | NEW |