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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 cleanup_test_files) | 51 cleanup_test_files) |
52 self._test_arguments = test_arguments | 52 self._test_arguments = test_arguments |
53 self.in_webkit_checkout = in_webkit_checkout | 53 self.in_webkit_checkout = in_webkit_checkout |
54 if timeout == 0: | 54 if timeout == 0: |
55 timeout = 60 | 55 timeout = 60 |
56 # On a VM (e.g. chromium buildbots), this timeout is way too small. | 56 # On a VM (e.g. chromium buildbots), this timeout is way too small. |
57 if os.environ.get('BUILDBOT_SLAVENAME'): | 57 if os.environ.get('BUILDBOT_SLAVENAME'): |
58 timeout = timeout * 2 | 58 timeout = timeout * 2 |
59 self.timeout = timeout * self.tool.GetTimeoutScale() | 59 self.timeout = timeout * self.tool.GetTimeoutScale() |
60 | 60 |
61 logging.warning('Test suite: ' + test_suite) | 61 logging.warning('Test suite: ' + str(test_suite)) |
62 if os.path.splitext(test_suite)[1] == '.apk': | 62 if os.path.splitext(test_suite)[1] == '.apk': |
63 self.test_package = test_package_apk.TestPackageApk( | 63 self.test_package = test_package_apk.TestPackageApk( |
64 self.adb, | 64 self.adb, |
65 device, | 65 device, |
66 test_suite, | 66 test_suite, |
67 self.tool, | 67 self.tool, |
68 test_apk_package_name, | 68 test_apk_package_name, |
69 test_activity_name, | 69 test_activity_name, |
70 command_line_file) | 70 command_line_file) |
71 else: | 71 else: |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 super(TestRunner, self).SetUp() | 233 super(TestRunner, self).SetUp() |
234 if _TestSuiteRequiresMockTestServer(self.test_package.test_suite_basename): | 234 if _TestSuiteRequiresMockTestServer(self.test_package.test_suite_basename): |
235 self.LaunchChromeTestServerSpawner() | 235 self.LaunchChromeTestServerSpawner() |
236 self.tool.SetupEnvironment() | 236 self.tool.SetupEnvironment() |
237 | 237 |
238 #override | 238 #override |
239 def TearDown(self): | 239 def TearDown(self): |
240 """Cleans up the test enviroment for the test suite.""" | 240 """Cleans up the test enviroment for the test suite.""" |
241 self.tool.CleanUpEnvironment() | 241 self.tool.CleanUpEnvironment() |
242 super(TestRunner, self).TearDown() | 242 super(TestRunner, self).TearDown() |
OLD | NEW |