INACTIVE - http://mzl.la/ghe-archive - Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see
Перейти к файлу
Sam Foster b99d065fa5 Merge pull request #23 from punamdahiya/haiku-experiment-9-ui-changes
Haiku experiment 9 UI review changes
2016-10-06 16:13:57 -07:00
apps UI review changes 2016-10-06 16:05:24 -07:00
bin Bug 1227219 - Try to get reproductible list of files. r=aus, a=npotb 2015-11-26 10:44:10 +01:00
build Hook up power button to shutdown the phone if pressed for 5s 2016-10-04 16:03:10 -07:00
customization Bug 1213172 - Remove smart collections r=rickychien 2015-10-30 19:38:58 -07:00
dev_apps Bug 1222254 - incoming marketplace package (r=fabrice) 2015-11-05 18:20:03 -08:00
distros Merge pull request #32809 from gmarty/Bug-1219234-The-MozSpeech-Benchmark-app-icon-is-blurry 2015-11-02 09:53:01 +01:00
hosted_apps Bug 1196992 - Bump remotely hosted apps 2015-10-28 18:49:05 -07:00
locales Bug 1222204 - Add Persian (fa) to master and 2.5 builds, r=stas, a=mahe 2015-11-17 08:35:12 +01:00
shared Merge pull request #32927 from timdream/tz_select 2016-01-21 17:12:06 +08:00
test_media Merge pull request #33112 from gabrielesvelto/bug-1214222-fix-dialer-reference-workloads 2015-11-20 00:28:20 +01:00
tests Bug 1228554 - Release gaiatest-v2.5 to PyPI 2015-12-17 15:52:16 +01:00
tools Bug 1213172 - Remove smart collections r=rickychien 2015-10-30 19:38:58 -07:00
tv_apps Bug 1239907 - [TV][2.5] Improve and make l10n strings consistent for preview experience. r=lchang, a=jocheng 2016-01-25 11:25:13 +01:00
.editorconfig Bug 1155979 - Ensure Makefile can be indent with tabs 2015-04-18 22:28:23 +08:00
.eslintrc Bug 1203514 - update eslint, parse with babel 2015-09-14 12:12:41 +02:00
.gitignore Bug 1214220 - Add Raptors "metrics.ldjson" to .gitingore. r=eli 2015-10-13 17:07:48 +02:00
.jsdocrc Bug 1015013 - JSDoc 3 parse error getter/setter with the same name in strict mode 2014-05-23 16:39:45 +08:00
.jshintignore Bug 1236863 - Part 1: Bring sync app in v2.5 up to date with master, r=ferjm, a=josh 2016-01-08 11:24:43 +01:00
.jshintrc Bug 987282 - JSHint allow getter without setter globally r=julienw 2014-03-24 11:31:01 -07:00
Android.mk Revert "Bug 1146713 - export hardcoded gtk3 path in Android.mk" 2015-09-09 17:57:59 +08:00
CONTRIBUTING.md Bug 1055914 - Fix/update three links in contributing guide R=julien 2015-03-26 09:25:07 +01:00
LICENSE XXX - Update license to 2015 r=self 2015-06-07 18:56:02 -04:00
Makefile Bug 1228254 - Refine FIREFOX_SYNC flag and device.mk sequence in Makefile. r=poirot.alex, a=jocheng 2015-12-17 11:30:13 +01:00
README.md Update documentation of running marionette tests r=me 2015-09-22 15:30:39 +08:00
autolander.json Bug 1189176 - [Autolander] Update tasks for recent changes r=kgrandon 2015-07-29 22:58:21 -07:00
gaia.mk Revert "Revert "Bug 1059051 - Convert Keyboard-Symbols.woff to Keyboard-Symbols.ttf"" 2014-08-27 14:51:51 -07:00
gaia_node_modules.revision bug 1159667 - add eslint to tests r=julienw 2015-06-04 10:45:00 +02:00
gulpfile.js Bug 1193118 - [JSDOC] Generate jsdoc of tv_apps 2015-08-11 14:07:18 +08:00
package.json Revert "Merge pull request #32516 from JohanLorenzo/bug-1187330-3" for build failures 2015-10-16 12:23:38 -07:00
taskgraph.json Remove invalid scopes from taskgraph.json 2015-10-29 16:35:46 -04:00

README.md

Gaia

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.

Autolander (bot)

Autolander is a bot which integrations github and bugzilla workflows.

Features available:

  • Automatic pull request to bugzilla attachment linking.
  • Automatic landing, on green integration run, with a R+ from a suggested reviewer and the autoland keyword.
  • Comments in the bug with the landed commit, and marks the bug as fixed.
  • Validates pull request title and commit message formats.
  • Currently only runs a subset of the gaia CI tests which are stable on taskcluster. Ensure you have a green gaia-try run before adding the autoland keyword.
  • See more at: https://github.com/mozilla/autolander The Autolander guide on MDN

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.

As a convenience, you can also use the gaia-test script to launch the test-agent-server and open the Test Agent app in firefox:

  1. Add firefox to your $PATH or set $FIREFOX to your preferred firefox/aurora/nightly binary.
  2. Run ./bin/gaia-test to run the test-agent-server and launch firefox.
  3. Run make test-agent-test or modify files as described above.

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

Integration Tests

Gaia uses marionette-js-runner for ui testing. For the time being, tests need to live in apps/<some app>/test/marionette and should be named *_test.js. Gaia's marionette tests run on nodejs and you'll need nodejs>=v0.12 and npm>=v2.0 installed.

Also for the time being, shared code for tests lives in plugins at tests/jsmarionette/plugins or in helpers at shared/test/integration.

Running integration tests

npm run marionette

Invoking specific test files

TEST_FILES="/abs/path/to/some_test.js /abs/path/to/other_test.js" npm run marionette

Invoking tests for a specific app

APP=<APP> npm run marionette

Skipping a test file

SKIP_TEST_FILES="/abs/path/to/skipped_test.js /abs/path/to/other/skipped_test.js" npm run marionette

Moar things

  • VERBOSE=1 pipes gecko logs to your command line process for debugging.

  • If you don't have a b2g/ folder one will be downloaded for you. This can be problematic if you're offline. You can symlink a b2g-desktop directory to b2g/ in gaia to avoid the download.

Build System Tests

Build system has its own unit test and integration test. Both are running on Node.js

Build System Unit Tests

To run unit test locally, using following command:

$ make build-test-unit

Build System Integration Tests

To run integration test locally, using following command:

$ make build-test-integration

Invoking specific test files

Both the build unit or integration test can invoke specific test files by TEST_FILES

make build-test-unit TEST_FILES=<test file path>
make build-test-integration TEST_FILES=<test file path>

For example, we could run the keyboard_test.js build integration test in keyboard app with the below command.

make build-test-integration TEST_FILES=apps/keyboard/test/build/integration/keyboard_test.js

If you would like to run more than one test, we could do the below command.

make build-test-integration TEST_FILES="apps/keyboard/test/build/integration/keyboard_test.js apps/keyboard/test/build/integration/keyboard_layout_test.js"

Generate JSDOC

To generate API reference locally, run make docs command to generate docs. The generated per app API docs will be located in docs folder.

You could generate single app doc with this:

$ gulp jsdoc:system