Just a heads up: In an effort to help facilitate code mirroring between mozilla-central and the mozbase project (https://wiki.mozilla.org/Auto-tools/Projects/MozBase), I've moved most of the python device manager files used for mobile testing (both for Android and B2G) from `build/mobile` to `testing/mozbase/mozdevice`. For more information on the rationale for this change see https://bugzilla.mozilla.org/show_bug.cgi?id=723107

Note that while the locations have changed, the build logic is still the same. All the Android and B2G tests you have come to know and love should continue to run as normal. ;)

This is probably a good point to also plug the mozdevice library, which is now available on pypi (http://pypi.python.org/pypi/mozdevice/0.6). If you're writing standalone scripts that involve interacting with an Android or B2G device it can really save a lot of time. As an example, here's a script which starts up a copy of Firefox with a custom profile on a Android device connected with ADB:

    import mozprofile
    import mozdevice

profile = mozprofile.Profile(preferences = {'toolkit.telemetry.prompted': 2}) profile_dir = "/".join([device.getDeviceRoot(), os.path.basename(profile.profile)])
    if not device.pushDir(profile.profile, remote_profile_dir):
        raise Exception("Failed to copy profile to device")

    device = mozdevice.DroidADB()
device.launchFennec('org.mozilla.fennec_wlach', url="http://wrla.ch";, extraArgs = ["-profile", profile_dir]])

If you have more questions about using or contributing to mozdevice, feel free to ping me (:wlach) in irc.mozilla.org #ateam.

Will
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to