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

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

Issue 1112843002: [Android] Remove more uses of android_commands from build/android/pylib. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@detriplicated
Patch Set: fixes for host-driven tests & specific device Created 5 years, 8 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/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 1ca033834c4d446bb2b655de12573fae54fe522b..2a7fdd3d6ed6fb5ba26cace9ef9f738c919dfbf3 100644
--- a/build/android/pylib/base/base_test_runner.py
+++ b/build/android/pylib/base/base_test_runner.py
@@ -26,14 +26,15 @@ NET_TEST_SERVER_PORT_INFO_FILE = 'net-test-server-ports'
class BaseTestRunner(object):
"""Base class for running tests on a single device."""
- def __init__(self, device_serial, tool):
+ def __init__(self, device, tool):
"""
Args:
- device: Tests will run on the device of this ID.
+ device: An instance of DeviceUtils that the tests will run on.
tool: Name of the Valgrind tool.
"""
- self.device_serial = device_serial
- self.device = device_utils.DeviceUtils(device_serial)
+ assert isinstance(device, device_utils.DeviceUtils)
+ self.device = device
+ self.device_serial = self.device.adb.GetDeviceSerial()
self.tool = CreateTool(tool, self.device)
self._http_server = None
self._forwarder_device_port = 8000

Powered by Google App Engine
This is Rietveld 408576698