provide unit test script with gaia

RESOLVED FIXED

Status

Firefox OS
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bkelly, Assigned: bkelly)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ c= , p=1 ])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Gaia has some nice infrastructure for executing unit tests, but currently there are a few hurdles for new developers to start running them.  I'd like to propose that we commit a script similar to what is described here:

  https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests

I have a version of the script with some additional checking that might work as a starting point.  I'll attach a pull request.
(Assignee)

Comment 1

5 years ago
Created attachment 772666 [details]
Pull request at https://github.com/mozilla-b2g/gaia/pull/10867
Assignee: nobody → bkelly
(Assignee)

Updated

5 years ago
Attachment #772666 - Attachment mime type: text/plain → text/html
(Assignee)

Comment 2

5 years ago
This script could certainly use improvements in terms of command line optins, looking for firefox in reasonable places for Mac, etc.  It might be a good starting point, though.

I also added a make target that runs the server, so you can just run:

  make test-unit

Maybe not the best target name since it just runs the server and firefox.
(Assignee)

Comment 3

5 years ago
Talked to lightsofapollo on IRC and got an informal f+.  He'd like to see the README updated and have it reviewed by someone with more bash experience, though.
Whiteboard: [ c= , p=1 ]
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED

Updated

5 years ago
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
(Assignee)

Comment 4

5 years ago
Comment on attachment 772666 [details]
Pull request at https://github.com/mozilla-b2g/gaia/pull/10867

I've updated the pull request to add the script to the README.md section on unit tests.  I added it as a shortcut instead of replacing the full explanation.

Asking for review from mwu as the resident shell script guru.  :-)
Attachment #772666 - Flags: review?(mwu)

Comment 5

5 years ago
Comment on attachment 772666 [details]
Pull request at https://github.com/mozilla-b2g/gaia/pull/10867

Look ok to me, but I'm not entirely familiar with the unit tests here. Guess we'll just have to land and see if people hit problems.
Attachment #772666 - Flags: review?(mwu) → review+
(Assignee)

Comment 6

5 years ago
Thanks!  Merged:

  https://github.com/mozilla-b2g/gaia/commit/10bb911bd9eff3287d4fe35379b8b310a84e5fb9

I also updated the wiki here:

  https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Testing/Gaia_unit_tests#Launch_the_server_and_Firefox_Nightly

Please let me know if there are any problems.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.