| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 self._test_arguments = test_options.test_arguments | 45 self._test_arguments = test_options.test_arguments |
| 46 | 46 |
| 47 timeout = test_options.timeout | 47 timeout = test_options.timeout |
| 48 if timeout == 0: | 48 if timeout == 0: |
| 49 timeout = 60 | 49 timeout = 60 |
| 50 # On a VM (e.g. chromium buildbots), this timeout is way too small. | 50 # On a VM (e.g. chromium buildbots), this timeout is way too small. |
| 51 if os.environ.get('BUILDBOT_SLAVENAME'): | 51 if os.environ.get('BUILDBOT_SLAVENAME'): |
| 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 self._perf_controller = perf_control.PerfControl(self.adb) | 55 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
| 56 self._perf_controller = perf_control.PerfControl(self.adb) |
| 56 | 57 |
| 57 #override | 58 #override |
| 58 def InstallTestPackage(self): | 59 def InstallTestPackage(self): |
| 59 self.test_package.Install(self.adb) | 60 self.test_package.Install(self.adb) |
| 60 | 61 |
| 61 def GetAllTests(self): | 62 def GetAllTests(self): |
| 62 """Install test package and get a list of all tests.""" | 63 """Install test package and get a list of all tests.""" |
| 63 self.test_package.Install(self.adb) | 64 self.test_package.Install(self.adb) |
| 64 return self.test_package.GetAllTests(self.adb) | 65 return self.test_package.GetAllTests(self.adb) |
| 65 | 66 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 self.tool.SetupEnvironment() | 193 self.tool.SetupEnvironment() |
| 193 | 194 |
| 194 #override | 195 #override |
| 195 def TearDown(self): | 196 def TearDown(self): |
| 196 """Cleans up the test enviroment for the test suite.""" | 197 """Cleans up the test enviroment for the test suite.""" |
| 197 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): | 198 if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name): |
| 198 self._perf_controller.RestoreOriginalPerfMode() | 199 self._perf_controller.RestoreOriginalPerfMode() |
| 199 self.test_package.ClearApplicationState(self.adb) | 200 self.test_package.ClearApplicationState(self.adb) |
| 200 self.tool.CleanUpEnvironment() | 201 self.tool.CleanUpEnvironment() |
| 201 super(TestRunner, self).TearDown() | 202 super(TestRunner, self).TearDown() |
| OLD | NEW |