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

Unified Diff: build/android/pylib/gtest/test_runner.py

Issue 31063005: android: Run cc_perftests with high performance CPU governor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/test_runner.py
diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py
index 7312c3694c7eda71a205b9e0f54a2d23ff8bf0c6..c47bf66dfcef0cf325c364e9203b3fa517c4882c 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()
« 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