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

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

Issue 18258012: [Android] Some clean up around gtest packages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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/gtest/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 171e6fc3a318f554e9f06887cc8e7287d1b169b7..df04f9fb22da9408b8eb2371361a2cbddfc24025 100644
--- a/build/android/pylib/base/base_test_runner.py
+++ b/build/android/pylib/base/base_test_runner.py
@@ -28,19 +28,17 @@ NET_TEST_SERVER_PORT_INFO_FILE = 'net-test-server-ports'
class BaseTestRunner(object):
- """Base class for running tests on a single device.
+ """Base class for running tests on a single device."""
- A subclass should implement RunTests() with no parameter, so that calling
- the Run() method will set up tests, run them and tear them down.
- """
-
- def __init__(self, device, tool, build_type, push_deps):
+ def __init__(self, device, tool, build_type, push_deps=True,
+ cleanup_test_files=False):
"""
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.
+ tool: Name of the Valgrind tool.
build_type: 'Release' or 'Debug'.
push_deps: If True, push all dependencies to the device.
+ cleanup_test_files: Whether or not to cleanup test files on device.
"""
self.device = device
self.adb = android_commands.AndroidCommands(device=device)
@@ -61,6 +59,7 @@ class BaseTestRunner(object):
self.test_server_port = 0
self.build_type = build_type
self._push_deps = push_deps
+ self._cleanup_test_files = cleanup_test_files
def _PushTestServerPortInfoToDevice(self):
"""Pushes the latest port information to device."""
@@ -110,6 +109,8 @@ class BaseTestRunner(object):
def TearDown(self):
"""Run once after all tests are run."""
self.ShutdownHelperToolsForTestSuite()
+ if self._cleanup_test_files:
+ self.adb.RemovePushedFiles()
def LaunchTestHttpServer(self, document_root, port=None,
extra_config_contents=None):
« no previous file with comments | « no previous file | build/android/pylib/gtest/dispatch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698