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

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

Issue 23467004: [android] Update FlagChanger to work with additional apks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 4 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
Index: build/android/pylib/instrumentation/test_runner.py
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index 73440f53c570db80849b5c26bac36441f95ba85e..b5aad174f714c6b35e02d2aa9b05d517d1f1de10 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -11,6 +11,7 @@ import time
from pylib import android_commands
from pylib import constants
+from pylib import flag_changer
from pylib import json_perf_parser
from pylib import perf_tests_helper
from pylib import valgrind_tools
@@ -71,6 +72,13 @@ class TestRunner(base_test_runner.BaseTestRunner):
self.test_pkg = test_pkg
self.ports_to_forward = ports_to_forward
self.coverage_dir = test_options.coverage_dir
+ cmdline_file = [a.cmdline_file for a in constants.PACKAGE_INFO.itervalues()
+ if a.test_package == self.test_pkg.GetPackageName()]
frankf 2013/08/27 23:57:46 assert len(cmdline_file) <= 1
craigdh 2013/08/28 19:17:10 Done.
+ if len(cmdline_file) and cmdline_file[0]:
+ cmdline_file = cmdline_file[0]
+ else:
+ cmdline_file = constants.PACKAGE_INFO['chrome'].cmdline_file
+ self.flags = flag_changer.FlagChanger(self.adb, cmdline_file)
#override
def InstallTestPackage(self):
@@ -141,10 +149,11 @@ class TestRunner(base_test_runner.BaseTestRunner):
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port)
if self.ports_to_forward:
self._ForwardPorts([(port, port) for port in self.ports_to_forward])
- self.flags.AddFlags(['--enable-test-intents'])
+ self.flags.AddFlags(['--disable-fre', '--enable-test-intents'])
def TearDown(self):
"""Cleans up the test harness and saves outstanding data from test run."""
+ self.flags.Restore()
if self.ports_to_forward:
self._UnmapPorts([(port, port) for port in self.ports_to_forward])
super(TestRunner, self).TearDown()
« build/android/pylib/flag_changer.py ('K') | « build/android/pylib/gtest/test_package_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698