Add ability to install b2g into emulator for unit tests

RESOLVED FIXED in mozilla18

Status

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: jgriffin, Assigned: jgriffin)

Tracking

unspecified
mozilla18
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

For B2G we want to be able to install a pre-built gecko into the emulator at test time, when running any of mochitest, reftest, xcpshell, webapi tests.

This will likely end up as a tracking bug, since the mechanism to do this will probably vary to some extent between harness (i.e., we'll probably need changes to Marionette and b2gautomation.py at least).
Assignee: nobody → jgriffin
In order to tackle this, I'll need access to one of the actual b2g gecko builds made by buildbot.  I don't see them stored anywhere, only the build logs are at http://stage.mozilla.org/pub/mozilla.org/b2g/tinderbox-builds/mozilla-central-ics_armv7a_gecko/
I don't think they get uploaded anywhere...we can grab them off a build machine if you like. Which files are you looking for?
(In reply to Chris AtLee [:catlee] from comment #2)
> I don't think they get uploaded anywhere...we can grab them off a build
> machine if you like. Which files are you looking for?

Can you package the files in $OBJDIR/dist?

In order to get bug 789652 working, I think we'll have to upload the builds somewhere, so they can be downloaded by the test slaves.  I'll file a new bug for that.
(In reply to Jonathan Griffin (:jgriffin) from comment #3)
> (In reply to Chris AtLee [:catlee] from comment #2)
> > I don't think they get uploaded anywhere...we can grab them off a build
> > machine if you like. Which files are you looking for?
> 
> Can you package the files in $OBJDIR/dist?
> 
> In order to get bug 789652 working, I think we'll have to upload the builds
> somewhere, so they can be downloaded by the test slaves.  I'll file a new
> bug for that.

So it looks like we only need the files in $OBJDIR/dist/b2g.  Copying this to the device as a zipfile using adb takes only ~1 min.

catlee, can you give us access to a single instance of the b2g gecko build artifacts, so we can use this for testing?  We'd like to wrap this particular bug up next week.
Blocks: 793046
Uploaded to http://people.mozilla.org/~catlee/b2g-dist.tar.gz (mozilla-inbound revision 2fed77bd195f)
This adds a --gecko-path argument (instead of --install-gecko, it seemed more natural) to Marionette.  It seems to work ok.  I've let a few PEP style fixes in emulator.py creep into this patch; let me know if you'd prefer this without those.

After this is checked in, we can modify reftest/mochitest accordingly.
Attachment #665166 - Flags: review?(ahalberstadt)
Comment on attachment 665166 [details] [diff] [review]
Add --gecko-path argument to Marionette,

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

Awesome, I'll get this added to the reftest harness in a bit.

::: testing/marionette/client/marionette/emulator.py
@@ +329,5 @@
> +        self._run_adb(['remount'])
> +        self._run_adb(['shell', 'stop', 'b2g'])
> +        print 'installing gecko binaries'
> +        self._run_adb(['push', self.gecko_path, '/system/b2g'])
> +        print 'restarting B2G'

We should be using mozlog, but I assume we are already currently using print everywhere. So lets do that in a different bug.
Attachment #665166 - Flags: review?(ahalberstadt) → review+
https://hg.mozilla.org/mozilla-central/rev/510300b96e62

I filed the mozlog issue as bug 795094.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Blocks: 795099
Blocks: 795100
You need to log in before you can comment on or make changes to this bug.