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

RESOLVED FIXED in Firefox 60

Status

()

Firefox for Android
Testing
P1
normal
RESOLVED FIXED
24 days ago
13 days ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

(Blocks: 1 bug)

Trunk
Firefox 60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

24 days 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

24 days 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

23 days ago
Priority: -- → P1
(Assignee)

Updated

14 days ago
See Also: → bug 1291387
(Assignee)

Comment 2

14 days 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

14 days 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

13 days ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/026a0eec0d5f
Status: NEW → RESOLVED
Last Resolved: 13 days 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.