Closed Bug 1228459 Opened 9 years ago Closed 6 years ago

|mach test| mochitest-chrome is broken for local builds of Fennec

Categories

(Testing :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: nalexander, Assigned: gbrown)

References

Details

This line isn't right:

https://hg.mozilla.org/mozilla-central/annotate/c321d84038519dcf1670d59fd2c5c00ad8a85a55/testing/mozbase/mozrunner/mozrunner/devices/android_device.py#l134

That needs to check for ANDROID_PACKAGE_NAME to support local builders.  It's not clear that this approach makes sense, given that android_device runs in many environments, not all of which will have a build configuration to interrogate.

We could hack even more by looking for startswith('fennec') and exploiting that fact that local builds are 'fennec_$USER' and few people change the default.
Further to this: "adb shell pm list packages" returns nothing on my device :(
(In reply to Nick Alexander :nalexander from comment #0)
> That needs to check for ANDROID_PACKAGE_NAME to support local builders.

I wanted to be more approximate than that, to allow for cases where a nightly or release build is installed and the intention is to use that build, rather than the local build / ANDROID_PACKAGE_NAME. I'm not sure there's a clear "right" approach.

> Further to this: "adb shell pm list packages" returns nothing on my device :(

I haven't seen that before. What version of Android? Does "adb shell" seem to work? "adb shell pm"?


On another note, the bug title refers to browser-chrome -- we don't run browser-chrome tests against Android on treeherder so I haven't tried to explicitly support them on mach. ("mochitest-chrome" tests should be okay though - "mach mochitest --flavor chrome").
(In reply to Geoff Brown [:gbrown] from comment #2)
> (In reply to Nick Alexander :nalexander from comment #0)
> > That needs to check for ANDROID_PACKAGE_NAME to support local builders.
> 
> I wanted to be more approximate than that, to allow for cases where a
> nightly or release build is installed and the intention is to use that
> build, rather than the local build / ANDROID_PACKAGE_NAME. I'm not sure
> there's a clear "right" approach.

Well, this never works for local builders, since they don't install org.mozilla.{fennec,firefox}.  Let's loosen to startswith for both.

> > Further to this: "adb shell pm list packages" returns nothing on my device :(
> 
> I haven't seen that before. What version of Android? Does "adb shell" seem
> to work? "adb shell pm"?

Seems to be device specific.  The shell works fine, and running tests works fine.  Can we add a "--force" or "--no-install" or something?
 
> On another note, the bug title refers to browser-chrome -- we don't run
> browser-chrome tests against Android on treeherder so I haven't tried to
> explicitly support them on mach. ("mochitest-chrome" tests should be okay
> though - "mach mochitest --flavor chrome").

Sorry, was supposed to be "mochitest-chrome".
Summary: |mach test| browser-chrome is broken for local builds of Fennec → |mach test| mochitest-chrome is broken for local builds of Fennec
See Also: → 1231683
Verified

mach mochitest --flavor=chrome
mach test --flavor=chrome mobile/android/tests/browser/chrome

with local x86 build and x86 emulator running android 7.0.
Assignee: nobody → gbrown
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.