Bug 632954 - Ignore dashes in adb error messages; r=bc
☠☠ backed out by d7e6fff52db3 ☠ ☠
authorMike Shal <mshal@mozilla.com>
Mon, 18 Mar 2019 23:53:15 +0000
changeset 465141 26031d3623333bbdedd1fb388f0867bc9f7cc23c
parent 465140 097f141a499d151e167c85dcb57e66aade7c28cb
child 465142 b96dd954a456d8088a3ceda66f51d4106f516b4a
push id35732
push useropoprus@mozilla.com
push dateWed, 20 Mar 2019 10:52:37 +0000
treeherdermozilla-central@708979f9c3f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs632954
milestone68.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 632954 - Ignore dashes in adb error messages; r=bc The regex should match '-' characters as well as \w to properly trim the error message if the device string contains a dash. Differential Revision: https://phabricator.services.mozilla.com/D22823
testing/mozbase/mozdevice/mozdevice/adb.py
--- a/testing/mozbase/mozdevice/mozdevice/adb.py
+++ b/testing/mozbase/mozdevice/mozdevice/adb.py
@@ -44,17 +44,17 @@ class ADBProcess(object):
             self.stdout_file.seek(0, os.SEEK_SET)
             content = self.stdout_file.read().rstrip()
         return content
 
     def __str__(self):
         # Remove -s <serialno> from the error message to allow bug suggestions
         # to be independent of the individual failing device.
         arg_string = ' '.join(self.args)
-        arg_string = re.sub(' -s \w+', '', arg_string)
+        arg_string = re.sub(' -s [\w-]+', '', arg_string)
         return ('args: %s, exitcode: %s, stdout: %s' % (
             arg_string, self.exitcode, self.stdout))
 
 # ADBError, ADBRootError, and ADBTimeoutError are treated
 # differently in order that unhandled ADBRootErrors and
 # ADBTimeoutErrors can be handled distinctly from ADBErrors.