mach commands for Android testing offer to install firefox, even when --app is specified

RESOLVED FIXED in Firefox 60

Status

()

P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

Trunk
Firefox 60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
The Android testing mach commands (mochitest, reftest) check that Firefox for Android is installed before running tests; if not found, they offer:

$ ./mach reftest --app=org.mozilla.geckoview_example
It looks like Firefox is not installed on this device.
Install Firefox? (Y/n) n

That's inconvenient and not useful when trying to run tests against a different application.
(Assignee)

Comment 1

a year ago
A complication here is that we can leverage 'mach install' to install Firefox, but I don't think there is corresponding support for installing geckoview_example...and it's likely not possible to reliably determine an appropriate apk from --app.
(Assignee)

Updated

a year ago
Priority: -- → P1
(Assignee)

Updated

a year ago
See Also: → bug 1291387
(Assignee)

Comment 2

a year ago
Created attachment 8949853 [details] [diff] [review]
verify install of correct app when --app specified for robocop/mochitest/reftest

In the near future I expect more interest in testing against geckoview_example or similar applications. That's easily handled with the existing --app argument. This patch pays attention to --app when checking to see if the device has a test application installed. For testing Firefox for Android, this should mean no change to the existing behavior. For testing with geckoview_example or similar, mach will warn if the app is not installed and provide an opportunity to install it. We might be able to improve on that -- perform the installation automatically -- in the future, when/if 'mach install' is enhanced. I think this is good enough for now.

$ ./mach robocop testAboutPage --app=org.mozilla.geckoview_example
No Android devices connected. Start an emulator? (Y/n) 
Starting emulator running Android 4.3...
Running the arm emulator; be sure to install an arm APK!
It looks like org.mozilla.geckoview_example is not installed on this device,
but I don't know how to install it.
Install it now, then hit Enter
Attachment #8949853 - Flags: review?(jmaher)
Comment on attachment 8949853 [details] [diff] [review]
verify install of correct app when --app specified for robocop/mochitest/reftest

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

good idea
Attachment #8949853 - Flags: review?(jmaher) → review+

Comment 4

a year ago
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/026a0eec0d5f
Check for installation of correct test application when --app is passed to mach; r=jmaher

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/026a0eec0d5f
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox60: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.