Adding test coverage for B2G Installer addon

RESOLVED FIXED

Status

RESOLVED FIXED
3 years ago
3 years ago

People

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

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [systemsfe])

Attachments

(1 attachment, 10 obsolete attachments)

52 bytes, text/x-github-pull-request
daleharvey
: review+
Details | Review | Splinter Review
(Assignee)

Description

3 years ago
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
(Assignee)

Comment 3

3 years ago
with faking adb device and fastboot device for whole process \o/ https://treeherder.mozilla.org/#/jobs?repo=try&revision=af97a3b71d71
(Assignee)

Comment 5

3 years ago
Created attachment 8702881 [details] [diff] [review]
Include B2G Installer addon r=...
(Assignee)

Comment 6

3 years ago
Created attachment 8702882 [details] [diff] [review]
Fix newChannelFromURI() deprecation triggering assertions failure
(Assignee)

Updated

3 years ago
Attachment #8702881 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Attachment #8702882 - Attachment is obsolete: true
(Assignee)

Comment 8

3 years ago
(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
(Assignee)

Comment 9

3 years ago
all green and stable over 20 retries (on osx 10.10 at least for now), https://treeherder.mozilla.org/#/jobs?repo=try&revision=266d3c5d0da0
(Assignee)

Comment 10

3 years ago
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.
(Assignee)

Comment 11

3 years ago
Created attachment 8703421 [details] [diff] [review]
Include B2G Installer addon r=...
(Assignee)

Comment 12

3 years ago
Created attachment 8703422 [details] [diff] [review]
Fix newChannelFromURI() deprecation triggering assertions failure
(Assignee)

Comment 13

3 years ago
Created attachment 8703423 [details] [diff] [review]
Add test coverage for B2G Installer r=...
(Assignee)

Comment 14

3 years ago
Created attachment 8703624 [details] [diff] [review]
Include B2G Installer addon r=...
Attachment #8703421 - Attachment is obsolete: true
(Assignee)

Comment 15

3 years ago
Created attachment 8703625 [details] [diff] [review]
Fix newChannelFromURI() deprecation triggering assertions failure
Attachment #8703422 - Attachment is obsolete: true
(Assignee)

Comment 16

3 years ago
Created attachment 8703626 [details] [diff] [review]
Add test coverage for B2G Installer r=...
Attachment #8703423 - Attachment is obsolete: true
(Assignee)

Updated

3 years ago
Blocks: 1233019
(Assignee)

Comment 17

3 years ago
Created attachment 8704107 [details] [diff] [review]
Include B2G Installer addon
Attachment #8703624 - Attachment is obsolete: true
Attachment #8703625 - Attachment is obsolete: true
(Assignee)

Comment 18

3 years ago
Created attachment 8704108 [details] [diff] [review]
Add test coverage for B2G Installer
Attachment #8703626 - Attachment is obsolete: true
(Assignee)

Comment 19

3 years ago
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
(Assignee)

Comment 20

3 years ago
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 :)
(Assignee)

Comment 21

3 years ago
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]
(Assignee)

Updated

3 years ago
Depends on: 1240707
(Assignee)

Comment 24

3 years ago
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
(Assignee)

Comment 25

3 years ago
Created attachment 8713606 [details] [review]
PR including everything

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+
(Assignee)

Comment 27

3 years ago
https://github.com/mozilla-b2g/b2g-installer/commit/588dd0434fae927cff2b21d97e5f68413e573f26
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.