Closed
Bug 636451
Opened 14 years ago
Closed 14 years ago
devicemanager should have the ability to terminate when it can't launch a second process
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jmaher, Assigned: jmaher)
Details
(Whiteboard: [mobile_unittests])
Attachments
(1 file, 1 obsolete file)
4.16 KB,
patch
|
jmaher
:
review+
cmtalbert
:
feedback+
|
Details | Diff | Splinter Review |
currently when we are launching a process, we check if it is running first and spit out a warning. The problem is we continue to run and timeout because our intended process never launched.
Assignee | ||
Updated•14 years ago
|
Whiteboard: [mobile_unittests]
Assignee | ||
Comment 1•14 years ago
|
||
this patch adds in an option to fail a launchProcess/fireProcess call if we detect the process is already running. Clint pointed out that launchProcess will return None if we fail getDeviceRoot() or if we fail fireProcess(). I think in both of these situations we should expect things to fail miserably. It is unfortunate that we don't have a error code system, but this seems acceptable to me.
In addition, while testing this on a windows box, I found that we had some backslash issues and a simple fix in pushFile does the trick to get us up and running.
Assignee: nobody → jmaher
Attachment #514795 -
Flags: review?(mcote)
Attachment #514795 -
Flags: feedback?(ctalbert)
Comment 2•14 years ago
|
||
Comment on attachment 514795 [details] [diff] [review]
fail if we are already running (1.0)
+ if (os.name == "nt"):
+ destname = destname.replace('//', '\')
Not sure what this is doing... should this not be .replace('\\', '/')? It's translating from a Windows path to a Unix path, right?
- if self.fireProcess(cmdline) is None:
+ if self.fireProcess(cmdline, failIfRunning) is None:
Btw, in general you should be careful with "is". It verifies that the two objects are one and the same--not just that their *values* are the same. In this case it's fine, but in general == is preferred unless you have a really good reason to be comparing object identities.
Anyway good aside from my question up top.
Attachment #514795 -
Flags: review?(mcote) → review+
Assignee | ||
Comment 3•14 years ago
|
||
updated for the fix. I had transposed these and didn't catch it before hand. I did a quick cleanup of some rouge print statements as well.
Attachment #514795 -
Attachment is obsolete: true
Attachment #514795 -
Flags: feedback?(ctalbert)
Attachment #514807 -
Flags: review+
Attachment #514807 -
Flags: feedback?(ctalbert)
Comment on attachment 514807 [details] [diff] [review]
fail if we are already running (1.1)
Looks good, thanks!
Attachment #514807 -
Flags: feedback?(ctalbert) → feedback+
Assignee | ||
Comment 5•14 years ago
|
||
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Component: New Frameworks → General
You need to log in
before you can comment on or make changes to this bug.
Description
•