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 android_commands | 9 from pylib import android_commands |
10 from pylib import constants | 10 from pylib import constants |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 timeout = timeout * 2 | 52 timeout = timeout * 2 |
53 | 53 |
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.adb) | 56 self._perf_controller = perf_control.PerfControl(self.adb) |
57 | 57 |
58 #override | 58 #override |
59 def InstallTestPackage(self): | 59 def InstallTestPackage(self): |
60 self.test_package.Install(self.adb) | 60 self.test_package.Install(self.adb) |
61 | 61 |
62 def GetAllTests(self): | |
63 """Install test package and get a list of all tests.""" | |
64 self.test_package.Install(self.adb) | |
65 return self.test_package.GetAllTests(self.adb) | |
66 | |
67 #override | 62 #override |
68 def PushDataDeps(self): | 63 def PushDataDeps(self): |
69 self.adb.WaitForSdCardReady(20) | 64 self.adb.WaitForSdCardReady(20) |
70 self.tool.CopyFiles() | 65 self.tool.CopyFiles() |
71 if os.path.exists(constants.ISOLATE_DEPS_DIR): | 66 if os.path.exists(constants.ISOLATE_DEPS_DIR): |
72 device_dir = self.adb.GetExternalStorage() | 67 device_dir = self.adb.GetExternalStorage() |
73 # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir | 68 # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir |
74 # as breakpad_unittests exe. Find a better way to do this. | 69 # as breakpad_unittests exe. Find a better way to do this. |
75 if self.test_package.suite_name == 'breakpad_unittests': | 70 if self.test_package.suite_name == 'breakpad_unittests': |
76 device_dir = constants.TEST_EXECUTABLE_DIR | 71 device_dir = constants.TEST_EXECUTABLE_DIR |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 self.tool.SetupEnvironment() | 188 self.tool.SetupEnvironment() |
194 | 189 |
195 #override | 190 #override |
196 def TearDown(self): | 191 def TearDown(self): |
197 """Cleans up the test enviroment for the test suite.""" | 192 """Cleans up the test enviroment for the test suite.""" |
198 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 193 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
199 self._perf_controller.RestoreOriginalPerfMode() | 194 self._perf_controller.RestoreOriginalPerfMode() |
200 self.test_package.ClearApplicationState(self.adb) | 195 self.test_package.ClearApplicationState(self.adb) |
201 self.tool.CleanUpEnvironment() | 196 self.tool.CleanUpEnvironment() |
202 super(TestRunner, self).TearDown() | 197 super(TestRunner, self).TearDown() |
OLD | NEW |