Closed Bug 862508 Opened 11 years ago Closed 11 years ago

Autophone - should specify user when launching Fennec on Android 4.2

Categories

(Testing Graveyard :: Autophone, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bc, Assigned: bc)

References

Details

Attachments

(3 files, 1 obsolete file)

Bug 838844 added the ability to specify the user when launching apps on Android 4.2. In Autophone we manually shell out to run 

exec "MOZ_CRASHREPORTER_NO_REPORT=1" am start -a android.intent.action.VIEW -n org.mozilla.fennec/.App --es args '--profile /storage/emulated/0/tests/autophone/profile' -d url

We need to either use mozdevice/droid.py's launchFennec or need to specify the user when launching fennec via shell. 

Is there any reason we aren't using launchFennec?

launchApplication also specifies -W (wait for launch to complete). Should we use that?
(In reply to Bob Clary [:bc:] from comment #0)

> Is there any reason we aren't using launchFennec?
> 
> launchApplication also specifies -W (wait for launch to complete). Should we
> use that?

I believe Autophone's app launching code was written before I wrote launchFennec/launchApplication. Of course I'm biased, but I think it would be great if you used it. ;)
Assignee: nobody → bclary
Status: NEW → ASSIGNED
Attached patch patch v1 (obsolete) — Splinter Review
Use DroidSUT's launchFennec. I need to kill fennec before doing the launch due to an issue with Fennec being preloaded on Android 4.2/x86 and causing launchFennec to barf about multiple instances. Android 2.3/armv7 also appears to have the preloaded Fennec but SUT doesn't see it and doesn't barf. That is an issue I'd like to understand better but not here.
Attachment #739089 - Flags: review?(mcote)
I believe this is responsible for a significant regression in throbber start times. I am investigating whether the am -W option is responsible.
Attached patch patch mozbaseSplinter Review
Allow caller to specify whether to use -W to launch an app.
Attachment #744104 - Flags: review?(wlachance)
Attached patch patch v2Splinter Review
Uses patched mozbase to allow us to specify whether to use -W to launch an fennec.
Attachment #739089 - Attachment is obsolete: true
Attachment #739089 - Flags: review?(mcote)
Attachment #744106 - Flags: review?(mcote)
Blocks: 866195
Comment on attachment 744104 [details] [diff] [review]
patch mozbase

Looks good, except for one docstring.

>diff --git a/mozdevice/mozdevice/droid.py b/mozdevice/mozdevice/droid.py
>+        :param wait: Boolean determining whether to pass -W to am

The fact that we use am under the hood is a bit of an implementation detail. Let's say something like "If True, wait for application to start before returning"
Attachment #744104 - Flags: review?(wlachance) → review+
Comment on attachment 744106 [details] [diff] [review]
patch v2

Review of attachment 744106 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Btw you can resolve bug 798854 at the same time as this, since this takes care of switching to DroidSUT.
Attachment #744106 - Flags: review?(mcote) → review+
Attached patch merged patchSplinter Review
wlach, I had failed to merge with recent commits and had to deal with the new argument failIfRunning. I put wait in front of failIfRunning. If that's not ok, I'll move it to the end. just let me know which you prefer.
Attachment #744147 - Flags: feedback?(wlachance)
Comment on attachment 744147 [details] [diff] [review]
merged patch

It's all good to me. ;)
Attachment #744147 - Flags: feedback?(wlachance) → feedback+
thanks! https://github.com/mozilla/mozbase/commit/97e219af22a7e4930d6aae481f242fb308c8b0bb
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: