Bug 1499102 - [mozdevice] Allow HOST:PORT as device serial number, bump mozdevice to version 1.1.3, r=gbrown.
authorBob Clary <bclary@bclary.com>
Mon, 15 Oct 2018 21:03:00 -0700
changeset 499879 24d8d0ea578a8d683794237561a825abe8b1d32e
parent 499878 30eee1bc0e6ce185f19a99828bca515b722aec4d
child 499880 b9fec5dd4ff5ed4a098f5254c701d8c47d3100c5
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1499102
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1499102 - [mozdevice] Allow HOST:PORT as device serial number, bump mozdevice to version 1.1.3, r=gbrown.
testing/mozbase/mozdevice/mozdevice/adb.py
testing/mozbase/mozdevice/setup.py
--- a/testing/mozbase/mozdevice/mozdevice/adb.py
+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
@@ -708,18 +708,23 @@ class ADBDevice(ADBCommand):
                 raise ValueError("ADBDevice called with multiple devices "
                                  "attached and no device specified")
             elif len(devices) == 0:
                 # We could error here, but this way we'll wait-for-device before we next
                 # run a command, which seems more friendly
                 return
             device = devices[0]
 
+        # Allow : in device serial if it matches a tcpip device serial.
+        re_device_serial_tcpip = re.compile(r'[^:]+:[0-9]+$')
+
         def is_valid_serial(serial):
-            return ":" not in serial or serial.startswith("usb:")
+            return serial.startswith("usb:") or \
+                re_device_serial_tcpip.match(serial) is not None or \
+                ":" not in serial
 
         if isinstance(device, (str, unicode)):
             # Treat this as a device serial
             if not is_valid_serial(device):
                 raise ValueError("Device serials containing ':' characters are "
                                  "invalid. Pass the output from "
                                  "ADBHost.devices() for the device instead")
             return device
--- a/testing/mozbase/mozdevice/setup.py
+++ b/testing/mozbase/mozdevice/setup.py
@@ -3,17 +3,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import
 
 from setuptools import setup
 
 PACKAGE_NAME = 'mozdevice'
-PACKAGE_VERSION = '1.1.2'
+PACKAGE_VERSION = '1.1.3'
 
 deps = ['mozfile >= 1.0',
         'mozlog >= 3.0',
         'moznetwork >= 0.24',
         'mozprocess >= 0.19',
         ]
 
 setup(name=PACKAGE_NAME,