Closed Bug 891366 Opened 6 years ago Closed 6 years ago

provide unit test script with gaia


(Firefox OS Graveyard :: General, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: bkelly, Assigned: bkelly)


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


(1 file)

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:

I have a version of the script with some additional checking that might work as a starting point.  I'll attach a pull request.
Attachment #772666 - Attachment mime type: text/plain → text/html
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.
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 ]
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Comment on attachment 772666 [details]
Pull request at

I've updated the pull request to add the script to the 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 on attachment 772666 [details]
Pull request at

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+
Thanks!  Merged:

I also updated the wiki here:

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