Closed Bug 891366 Opened 11 years ago Closed 11 years ago

provide unit test script with gaia

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bkelly, Assigned: bkelly)

Details

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

Attachments

(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:

  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.
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 ]
Status: NEW → ASSIGNED
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
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 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+
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
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: