Bug 717725 - sutagent 'exec' waits for 'am instrument...' command to finish instead of letting it run in the background. r=gbrown
authorJoel Maher <jmaher@mozilla.com>
Sat, 14 Jan 2012 08:24:17 -0500
changeset 85720 bf46df6a1fd98f07b844f104380f0bc0915baf06
parent 85719 6529bd9386cb2a6196c3ded1e130ede566d5634b
child 85721 da960aeaf4bfb42eea3819f67a920513669383d6
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)
reviewersgbrown
bugs717725
milestone12.0a1
Bug 717725 - sutagent 'exec' waits for 'am instrument...' command to finish instead of letting it run in the background. r=gbrown
build/mobile/remoteautomation.py
--- a/build/mobile/remoteautomation.py
+++ b/build/mobile/remoteautomation.py
@@ -151,17 +151,20 @@ class RemoteAutomation(Automation):
     class RProcess(object):
         # device manager process
         dm = None
         def __init__(self, dm, cmd, stdout = None, stderr = None, env = None, cwd = '.'):
             self.dm = dm
             self.stdoutlen = 0
             self.proc = dm.launchProcess(cmd, stdout, cwd, env, True)
             if (self.proc is None):
-              raise Exception("unable to launch process")
+              if cmd[0] == 'am':
+                self.proc = stdout
+              else:
+                raise Exception("unable to launch process")
             exepath = cmd[0]
             name = exepath.split('/')[-1]
             self.procName = name
 
             # Setting timeout at 1 hour since on a remote device this takes much longer
             self.timeout = 3600
             time.sleep(15)