summaryrefslogtreecommitdiffstats
path: root/build/android
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 11:30:49 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-24 11:30:49 +0000
commit3d04b29ad4a40fb29dc4924dbea6a05c2487eb0e (patch)
treef4d46586344a5a4a1bb1028a557d4367af27fabc /build/android
parent1beed87a025acfc5987cf70c8e00f1ba7e2d4eea (diff)
downloadchromium_src-3d04b29ad4a40fb29dc4924dbea6a05c2487eb0e.zip
chromium_src-3d04b29ad4a40fb29dc4924dbea6a05c2487eb0e.tar.gz
chromium_src-3d04b29ad4a40fb29dc4924dbea6a05c2487eb0e.tar.bz2
android: Run cc_perftests with high performance CPU governor
Run the cc_perftests test suite with the high performance CPU governor on Android to reduce the amount of noise in the results. BUG=310000 Review URL: https://codereview.chromium.org/31063005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230692 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rw-r--r--build/android/pylib/gtest/test_runner.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py
index 7312c36..c47bf66 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -11,6 +11,7 @@ from pylib import constants
from pylib import pexpect
from pylib.base import base_test_result
from pylib.base import base_test_runner
+from pylib.perf import perf_control
def _TestSuiteRequiresMockTestServer(suite_name):
@@ -21,6 +22,9 @@ def _TestSuiteRequiresMockTestServer(suite_name):
return (suite_name in
tests_require_net_test_server)
+def _TestSuiteRequiresHighPerfMode(suite_name):
+ """Returns True if the test suite requires high performance mode."""
+ return 'perftests' in suite_name
class TestRunner(base_test_runner.BaseTestRunner):
def __init__(self, test_options, device, test_package):
@@ -48,6 +52,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
timeout = timeout * 2
self._timeout = timeout * self.tool.GetTimeoutScale()
+ self._perf_controller = perf_control.PerfControl(self.adb)
#override
def InstallTestPackage(self):
@@ -182,11 +187,15 @@ class TestRunner(base_test_runner.BaseTestRunner):
super(TestRunner, self).SetUp()
if _TestSuiteRequiresMockTestServer(self.test_package.suite_name):
self.LaunchChromeTestServerSpawner()
+ if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name):
+ self._perf_controller.SetHighPerfMode()
self.tool.SetupEnvironment()
#override
def TearDown(self):
"""Cleans up the test enviroment for the test suite."""
+ if _TestSuiteRequiresHighPerfMode(self.test_package.suite_name):
+ self._perf_controller.RestoreOriginalPerfMode()
self.test_package.ClearApplicationState(self.adb)
self.tool.CleanUpEnvironment()
super(TestRunner, self).TearDown()