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 |