Closed
Bug 1482887
Opened 7 years ago
Closed 7 years ago
Remote automation should kill already running instances rather than dying
Categories
(Testing :: General, enhancement)
Testing
General
Tracking
(firefox63 fixed)
RESOLVED
FIXED
mozilla63
| Tracking | Status | |
|---|---|---|
| firefox63 | --- | fixed |
People
(Reporter: bc, Assigned: bc)
Details
Attachments
(1 file)
|
1.17 KB,
patch
|
gbrown
:
review+
|
Details | Diff | Splinter Review |
adb_android.py's launch_application has an option to fail if an instance is already running which can be useful however remoteautomation.py does not attempt to recover the situation. I think we should have RProcess kill any running instance prior to attempting to launch.
| Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment on attachment 8999615 [details] [diff] [review]
RProcess-stop-application.patch
Review of attachment 8999615 [details] [diff] [review]:
-----------------------------------------------------------------
Traditionally, we stop the test app when the harness is starting. For example,
https://dxr.mozilla.org/mozilla-central/rev/4e56a2f51ad739ca52046723448f3129a58f1666/testing/mochitest/runtestsremote.py#95
...and also, we try to make sure that the app is stopped after a test run completes:
https://dxr.mozilla.org/mozilla-central/rev/4e56a2f51ad739ca52046723448f3129a58f1666/build/mobile/remoteautomation.py#90-92
But I think there are some holes in that logic: Like on a mochitest run with multiple browser sessions, if the browser goes to the background, if get_top_activity fails, etc. So, I like this!
::: build/mobile/remoteautomation.py
@@ +241,5 @@
> self.stdoutlen = 0
> self.utilityPath = None
>
> + if app and self.device.process_exist(app):
> + print("remoteautomation.py %s is already running. Stopping...")
If we could do without this message, I think we could avoid the process_exist() call -- it looks like calling stop_application is okay whether the process is running or not. But the message might be useful -- alert us to unexpected behavior, etc. -- so probably best to keep it as it is.
Attachment #8999615 -
Flags: review?(gbrown) → review+
| Assignee | ||
Comment 4•7 years ago
|
||
Thanks. I ran into this a bunch this weekend trying to get mach working for android hardware testing. Maybe we can chase it down.
Pushed by bclary@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f7bfeff4b2f
Remote automation should kill already running instances rather than dying, r=gbrown.
Comment 6•7 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•