Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project
JavaScript Python Other
Pull request Compare This branch is 34902 commits behind mozilla-b2g:master.
Permalink
Failed to load latest commit information.
apps Bug 881672 - Enabling a DUMP function for all Gaia apps, r=kaze Jun 19, 2013
build Bug 881672 - Enabling a DUMP function for all Gaia apps, r=kaze Jun 19, 2013
dictionaries Bug 865484 - refactor dictionary data structure and search algorithm … Apr 30, 2013
dogfood_apps/feedback Bug 828843 - Remove feedback app from release builds. r=ochameau Jan 22, 2013
external-apps update Marketplace packaged app with offline handler (bug 875849) May 30, 2013
locales Bug 881310 - Add Serbian (Cyrillic) entry Jun 10, 2013
media-samples move sample photos from /sdcard/Pictures back to /sdcard/DCIM Jun 25, 2012
shared Bug 881672 - Enabling a DUMP function for all Gaia apps, r=kaze Jun 19, 2013
showcase_apps Bug 828843 - Remove feedback app from release builds. r=ochameau Jan 22, 2013
test_apps Bug 825148 - Make UI Tests and Test receivers app work with CSP Jun 13, 2013
test_external_apps Bug 862418 - make the build more strict with bad metadata.json files … May 18, 2013
test_media Bug 872115 - Updated reference workload databases in master May 17, 2013
tests Merge pull request #10169 from lightsofapollo/use-marionette Jun 4, 2013
tools Bug 884338 - Travis no likey multiprocess :( Jun 18, 2013
.gitignore Bug 882363 - Only enable Facebook functionality if the app id is part… Jun 14, 2013
.travis.yml Bug 842349 - disable travis except master May 2, 2013
Android.mk Bug 835345 - Added preloaded contacts in build time r=vingtetun Feb 7, 2013
CONTRIBUTING.md Bug 876601 - update README.md and CONTRIBUTING.md May 29, 2013
LICENCE Switch to Apache License. Apr 19, 2012
Makefile Bug 884406 - Makefile will throw an error if the test fails r=julienw Jun 18, 2013
README.md Bug 876601 - update README.md and CONTRIBUTING.md May 29, 2013

README.md

Gaia Build Status

Gaia is Mozilla's Phone UX for the Boot to Gecko (B2G) project.

Boot to Gecko aims to create a complete, standalone operating system for the open web.

You can read more about B2G here:

http://mozilla.org/b2g

follow us on twitter: @Boot2Gecko

http://twitter.com/Boot2Gecko

join the Gaia mailing list:

http://groups.google.com/group/mozilla.dev.gaia

and talk to us on IRC:

#gaia on irc.mozilla.org

Hacking Gaia

The Gaia/Hacking page on MDN has all the information that you need to start working on Gaia, including building and running Gaia on a compatible device or desktop computer.

Tests

Unit Tests

Unit tests for an app go in apps/<APP>/test/unit/.

To run all the unit tests with B2G Desktop:

  1. Run DEBUG=1 make
  2. Run make test-agent-server &
  3. Run B2G Desktop and open the Test Agent app
  4. Run make test-agent-test

    or make test-agent-test APP=<APP> to run unit tests for a specific app

More importantly, you can use test-agent-server to watch the files on the filesystem and execute relevant tests when they change:

  1. Run DEBUG=1 make
  2. Run make test-agent-server &
  3. Run B2G Desktop and open the Test Agent app
  4. Edit files and when you save them, glance at the console with test-agent-server running

Note: If you add new files, you will need to restart test-agent-server.

For more details on writing tests, see: https://developer.mozilla.org/en/Mozilla/Boot_to_Gecko/Gaia_Unit_Tests

Integration Tests

Integration tests for an app are located in apps/<APP>/test/integration/.

Prerequisites:

  1. adb
  2. FirefoxOS Device / Emulator / B2G Desktop

To run integration tests:

  1. In your gaia/ directory, run make to build the profile
  2. Run B2G Desktop

    or forward port 2828 from your device / emulator using adb forward tcp:2828 tcp:2828

  3. Run make test-integration from the gaia/ directory

    or make test-integration APP=<APP> to run unit tests for a specified app

    or make test-integration TESTS=<PATH/TO/TESTFILE.js> to run unit tests in a specific file

    or make test-integration REPORTER=<REPORTER> to run integration tests with the specified reporter, for example XUnit

    or make test-integration TESTVARS=<PATH/TO/TESTVARS.json> to run tests with variables in the testvars file (this defaults to testvars.json)

Note: If you're using a FirefoxOS Device, it must have been flashed with a build with marionette enabled. If it doesn't have marionette enabled, then running make test-integration will time out.

The testvars file is a JSON file that maps app names to objects holding key/values as required by that app's integration tests. See that app's integration test code and/or README for which key/values are required.