Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Sat, 07 Jan 2012 18:41:08 -0500
changeset 85245 96e27b40144f46820485497a2bc343d0fa7a5dd5
parent 85244 aea8ac101dfee2d5b406926d3f2ec833a11f2834
child 85246 33359378d8f80f88796c969cd30e862f46191fce
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs716077
milestone12.0a1
Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher
build/mobile/devicemanager.py
build/mobile/devicemanagerSUT.py
--- a/build/mobile/devicemanager.py
+++ b/build/mobile/devicemanager.py
@@ -203,24 +203,24 @@ class DeviceManager:
     #ex: '"name=value;name2=value2;etc=..." process args' -> 'process args'
     parts = appname.split('"')
     if (len(parts) > 2):
       appname = ' '.join(parts[2:]).strip()
   
     pieces = appname.split(' ')
     parts = pieces[0].split('/')
     app = parts[-1]
-    procre = re.compile('.*' + app + '.*')
 
     procList = self.getProcessList()
     if (procList == []):
       return None
       
     for proc in procList:
-      if (procre.match(proc[1])):
+      procName = proc[1].split('/')[-1]
+      if (procName == app):
         pid = proc[0]
         break
     return pid
 
   # external function
   # returns:
   #  success: output from testagent
   #  failure: None
--- a/build/mobile/devicemanagerSUT.py
+++ b/build/mobile/devicemanagerSUT.py
@@ -547,24 +547,24 @@ class DeviceManagerSUT(DeviceManager):
     #ex: '"name=value;name2=value2;etc=..." process args' -> 'process args'
     parts = appname.split('"')
     if (len(parts) > 2):
       appname = ' '.join(parts[2:]).strip()
   
     pieces = appname.split(' ')
     parts = pieces[0].split('/')
     app = parts[-1]
-    procre = re.compile('.*' + app + '.*')
 
     procList = self.getProcessList()
     if (procList == []):
       return None
       
     for proc in procList:
-      if (procre.match(proc[1])):
+      procName = proc[1].split('/')[-1]
+      if (procName == app):
         pid = proc[0]
         break
     return pid
 
   # external function
   # returns:
   #  success: output from testagent
   #  failure: None