Closed Bug 1235459 Opened 4 years ago Closed 4 years ago

Adding test coverage for B2G Installer addon

Categories

(Firefox OS Graveyard :: B2gInstaller, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 10 obsolete files)

52 bytes, text/x-github-pull-request
daleharvey
: review+
Details | Review
We need testing to ensure the addon lives well. So far, I think the way that woukd make the most sense is to find a way to integrate addon code within mozilla-central (since in the end the code does rely on that) and add testing with mochitest and xpcshell
with faking adb device and fastboot device for whole process \o/ https://treeherder.mozilla.org/#/jobs?repo=try&revision=af97a3b71d71
Attachment #8702881 - Attachment is obsolete: true
Attachment #8702882 - Attachment is obsolete: true
(In reply to Alexandre LISSY :gerard-majax from comment #7)
> https://treeherder.mozilla.org/#/jobs?repo=try&revision=5129f44876dd

osx 10.6 fails to execute (at least) mkbootfs, but its okay on 10.10
all green and stable over 20 retries (on osx 10.10 at least for now), https://treeherder.mozilla.org/#/jobs?repo=try&revision=266d3c5d0da0
Improved coverage, with some refactoring, stable with more realistic flashing (adding some timeouts): https://treeherder.mozilla.org/#/jobs?repo=try&revision=bf62d8bfef2c

We are now coming to the point where we need to tune the fake blob free distribution zip because it contains real kernel and init and that makes it too huge (14MB).

Looks like xpcshell unit testing will only make sense/be doable on imaging_tools.js module because currently about.js contains references to the document and loads Devices.jsm which seems unavailable within xpcshell (because of the devtools packaging tricks?)

Anyway, test_connectivity.html and test_detect_b2g.html exposes more unit-testing oriented usecase so we can do something around there.
Attachment #8703421 - Attachment is obsolete: true
Attachment #8703423 - Attachment is obsolete: true
Blocks: 1233019
Attached patch Include B2G Installer addon (obsolete) — Splinter Review
Attachment #8703624 - Attachment is obsolete: true
Attachment #8703625 - Attachment is obsolete: true
Attachment #8703626 - Attachment is obsolete: true
runTest() has been made nicer to read with the use of Promise, and all the code is moved to browser/extensions/b2g-installer/
https://treeherder.mozilla.org/#/jobs?repo=try&revision=283218e8ff34
Getting ready for landing: https://treeherder.mozilla.org/#/jobs?repo=try&revision=cc7bf2a35637

This include source code for all the low levels tools addon relies on and its building them instead of relying on prebuilt binaries. Try is green and I have been able to flash a Nexus 5 running Lollipop with a user build out of taskcluster from the addon :)
Changed mkbootimg to use CAF one (because we need --dt support for devices like Z3c): https://treeherder.mozilla.org/#/jobs?repo=try&revision=550f946cc840

Much retriggers, no intermittence from my tests.
Whiteboard: [systemsfe]
Depends on: 1240707
For the time being, I am going to move back and land all this in b2g-installer repo. Building and running tests will still depend on m-c. To generate patches:
> $ cd browser/extensions/b2g-installer/ && git format-patch --relative -o ../../../b2g-installer-patches/ origin/master
So that includes everything. I wanted to prepare for Travis but so far it was a failure. I am leaving the code just in case but .travis.yml is renamed to make it not triggered.

Previous patches have been merged so the test coverage patch includes tests you already had a look at.

I tried to keep things clearly separated to make it easier for review with inclusion of external source code.

All the external tools/libs comes from AOSP Lollipop except mkbootimg which is CAF Lollipop (because we need their support for device tree argument).
Attachment #8704107 - Attachment is obsolete: true
Attachment #8704108 - Attachment is obsolete: true
Attachment #8713606 - Flags: review?(dale)
Comment on attachment 8713606 [details] [review]
PR including everything

This is huge and super clean. I couldnt find obvious issues and probably good to get this landed soon. Good job
Attachment #8713606 - Flags: review?(dale) → review+
https://github.com/mozilla-b2g/b2g-installer/commit/588dd0434fae927cff2b21d97e5f68413e573f26
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.