Fix AndroidDevice.get_prop, add tests.
Had messed this up while refactoring before I submitted and neglected
to add a test. Thanks to mazda@ for catching this.
Also disabled the root/unroot tests for user builds.
Change-Id: Icb819a820a2afa227d548d678ae471d5195f0b96
diff --git a/adb/device.py b/adb/device.py
index 601989b..57f17fc 100644
--- a/adb/device.py
+++ b/adb/device.py
@@ -60,6 +60,7 @@
raise NoUniqueDeviceError()
return AndroidDevice(devices[0], product)
+
def _get_device_by_serial(serial, product=None):
for device in get_devices():
if device == serial:
@@ -220,7 +221,7 @@
return self._simple_call(['wait-for-device'])
def get_prop(self, prop_name):
- output = self.shell(['getprop', prop_name])
+ output = self.shell(['getprop', prop_name]).splitlines()
if len(output) != 1:
raise RuntimeError('Too many lines in getprop output:\n' +
'\n'.join(output))