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

Unified Diff: build/android/pylib/base/base_test_runner.py

Issue 16627004: [Android] Add --skip-deps-push to test scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | build/android/pylib/browsertests/dispatch.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/base_test_runner.py
diff --git a/build/android/pylib/base/base_test_runner.py b/build/android/pylib/base/base_test_runner.py
index 662cb34934d66fa6d4e9b969f5fa55ef434bc4cd..0af5f502b1396314aedb5aac5261b10d3def043d 100644
--- a/build/android/pylib/base/base_test_runner.py
+++ b/build/android/pylib/base/base_test_runner.py
@@ -34,12 +34,13 @@ class BaseTestRunner(object):
the Run() method will set up tests, run them and tear them down.
"""
- def __init__(self, device, tool, build_type):
+ def __init__(self, device, tool, build_type, push_deps):
"""
Args:
device: Tests will run on the device of this ID.
shard_index: Index number of the shard on which the test suite will run.
build_type: 'Release' or 'Debug'.
+ push_deps: If True, push all dependencies to the device.
"""
self.device = device
self.adb = android_commands.AndroidCommands(device=device)
@@ -59,6 +60,7 @@ class BaseTestRunner(object):
self.test_server_spawner_port = 0
self.test_server_port = 0
self.build_type = build_type
+ self._push_deps = push_deps
def _PushTestServerPortInfoToDevice(self):
"""Pushes the latest port information to device."""
@@ -86,7 +88,11 @@ class BaseTestRunner(object):
def SetUp(self):
"""Run once before all tests are run."""
Forwarder.KillDevice(self.adb, self.tool)
- self.PushDependencies()
+ if self._push_deps:
+ logging.info('Pushing deps to device.')
+ self.PushDependencies()
nilesh 2013/06/12 17:25:12 This causes the apk install to be skipped as well.
+ else:
+ logging.warning('Skipping pushing deps to device.')
def TearDown(self):
"""Run once after all tests are run."""
« no previous file with comments | « no previous file | build/android/pylib/browsertests/dispatch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698