Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: build/android/pylib/gtest/test_runner.py

Issue 63403006: [Android] Guard perf_control creation in gtest test_runner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698