Closed Bug 790817 Opened 8 years ago Closed 8 years ago
Make installing xpcshell tests onto B2G devices faster
Currently, we install xpcshell tests onto the device in the same manner as for Fennec, namely, one file at a time. This takes, +/- 5 minutes, forever. A better method would be to tar all the files up, move the one single tar file to the device, and then untar them on the other side, ala https://github.com/mozilla-b2g/gaia/blob/master/build/install-gaia.py#L123 I imagine this would be about a bazillion times faster.
There is code in devicemanagerADB that will zip/push/unzip a whole directory, if all the tools are available: http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py#208 Setup for xpcshell-tests-remote is dramatically faster when this is used.
What :gbrown said wfm on otoro after I install busybox via this script . Also a thing that takes a while is the "cleanup" that occurs before running tests .  https://github.com/mihneadb/Negatus/blob/master/setup-tools.sh  https://mxr.mozilla.org/mozilla-central/source/testing/xpcshell/runtestsb2g.py#26
For me on a Nexus S phone this takes much more than 5 minutes --- at least 30 minutes, I don't know for sure as I haven't been able to complete that process. devicemanagerADB.py seems to have the ability to zip directories, push them, and unzip on the device. devicemanagerSUT.py does not seem to have this ability.
:bjacob, did you install busybox?
That device wasn't rooted. On a rooted device with busybox, devicemanagerADB does work fast. But devicemanagerSUT is still slow.
We'd like to figure out the best way to install busybox on the emulator inside buildbot for running xpcshell tests on TBPL. Ted, do you think we can check the busybox binary into the tree? I see gaia already has done this: https://github.com/mozilla-b2g/gaia/tree/master/build Alternatively, we could upload busybox to tooltool and add a mozharness step to download it and install in the emulator. Checking it into the tree would have the advantage that the automation could install it automatically for developers running tests locally.
I made this patch because testing locally was becoming too annoying. This sets up the automation to accept a --busybox option which will get emulator.py to install it for you. This way when we figure out how to get busybox in automation all we'll need to do is add the --busybox parameter to the mozharness configs
Attachment #686198 - Flags: review?(jgriffin)
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Comment on attachment 686198 [details] [diff] [review] Patch 1.0 - add ability to install busybox to emulator.py Review of attachment 686198 [details] [diff] [review]: ----------------------------------------------------------------- Nice! We can file a separate bug to upload the busybox binary to tooltool so we can use it in mozharness scripts in TBPL. All this retry code makes me think we might eventually want to add a 'retry' parameter to devicemanager's standard pushFile and pushDir methods.
Attachment #686198 - Flags: review?(jgriffin) → review+
I filed bug 816216 to add a retry parameter to various devicemanager commands.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Whiteboard: [automation-needed-in-aurora][automation-needed-in-beta] → [automation-needed-in-beta]
You need to log in before you can comment on or make changes to this bug.