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

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

Issue 107113006: [Android] Make cmdline_file argument to FlagChanger mandatory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e87de15b0f4e2dcc4b684a3c446146de2568abbe..dda8162ba6c12d44af20fc5ec3540bd39994911f 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -82,10 +82,10 @@ class TestRunner(base_test_runner.BaseTestRunner):
assert len(cmdline_file) < 2, 'Multiple packages have the same test package'
if len(cmdline_file) and cmdline_file[0]:
self.flags = flag_changer.FlagChanger(self.adb, cmdline_file[0])
+ if additional_flags:
+ self.flags.AddFlags(additional_flags)
else:
- self.flags = flag_changer.FlagChanger(self.adb)
- if additional_flags:
- self.flags.AddFlags(additional_flags)
+ self.flags = None
navabi 2013/12/19 22:51:17 Is it ok that this is now None? Is there anywhere
frankf 2013/12/20 20:22:17 Yea, these are all the instances. On 2013/12/19 2
#override
def InstallTestPackage(self):
@@ -154,11 +154,13 @@ class TestRunner(base_test_runner.BaseTestRunner):
# launch lighttpd with same port at same time.
http_server_ports = self.LaunchTestHttpServer(
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port)
- self.flags.AddFlags(['--disable-fre', '--enable-test-intents'])
+ if self.flags:
+ 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.flags:
+ self.flags.Restore()
super(TestRunner, self).TearDown()
def TestSetup(self, test):
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698