First, follow the instructions to build Firefox.
$ ./mach xpcshell-test services/common/tests/unit/test_kinto.js
$ ./mach xpcshell-test services/common/tests/unit/test_storage_adapter.js
From kinto.js repo, generate the moz-kinto-client.js
file:
$ npm run dist-fx
And overwrite it in the Firefox code base:
$ cp dist/moz-kinto-client.js ../mozilla-central/services/common
Re-run tests :)
Using inotify, we will detect a file change in the dist/
folder and run a series of commands to execute the tests automatically.
First, install inotify-tools
:
sudo apt-get install inotify-tools
Then start an infinite loop with inotify-wait
:
while true; do
# Wait for a change
inotifywait -q -e create,modify,delete -r ~/Code/Mozilla/kinto.js/dist
# Execute these commands
cp ~/Code/Mozilla/kinto.js/dist/moz-kinto-client.js services/common/
./mach xpcshell-test services/common/tests/unit/test_storage_adapter.js
./mach xpcshell-test services/common/tests/unit/test_kinto.js
done
Patch are contributed to kinto.js which is then released on NPM and updated manually in Mozilla central.
- Generate a SSH key
- Open a bugzilla ticket to request Level-1 access
- https://www.mozilla.org/en-US/about/governance/policies/commit/access-policy/
- Get a vouch (optional for level1)
Configure SSH key for hg:
Host hg.mozilla.org
User [email protected]
IdentityFile ~/.ssh/contrib_moz
See https://wiki.mozilla.org/ReleaseEngineering/TryServer
Or use a gecko-dev fork from Github, and with install moz git tools
git push-to-try -t --rev master..HEAD ~/hg/mozilla-central/ -b do -p linux,linux64,macosx64,win32,win64 -u xpcshell -t none
let console = (Cu.import("resource://gre/modules/devtools/Console.jsm", {})).console;
console.log("Hello from Firefox code");