76
edits
(→Setup) |
(→Setup) |
||
| Line 4: | Line 4: | ||
= Setup = | = Setup = | ||
=== Step one: Build Native Fennec === | |||
* First [https://developer.mozilla.org/en/Mozilla_Source_Code_%28Mercurial%29| grab the source] | |||
* Then [https://wiki.mozilla.org/Mobile/Fennec/Android_OtherBuildEnvs| setup your build environment] | |||
* Finally, build with the command <pre>make -f client.mk</pre> in the source directory | |||
Build | === Step two: Build Firefox (Necessary for XPCShell) === | ||
* Follow [https://developer.mozilla.org/En/Simple_Firefox_build| these instructions]; the source used here, although the same as Fennec's, should live in a separate folder | |||
<pre> | |||
=== Step three: Install Native Fennec === | |||
cd objdir | Run the following commands in sequence, from the Fennec source directory: | ||
<pre>cd {objdir} | |||
make package | make package | ||
adb install dist/fennec-*.apk | adb install dist/fennec-*.apk</pre> | ||
* NOTE *: {objdir} is a placeholder; the name of your object directory should not matter. | |||
= Running tests = | |||
=== Set up the MOZ_HOST_BIN environment variable === | |||
The MOZ_HOST_BIN variable will need to be set to the directory with XPCShell on your machine. | |||
You can execute the following command in the terminal, or it can be saved into .bashrc / .bash_profile for convinence: | |||
<pre>export MOZ_HOST_BIN=/ABSOLUTE/PATH/TO/FIREFOX/SOURCE/{objdir}/dist/bin</pre> | |||
If you're having difficulty finding the absolute path of XPCShell's directory, simply locate XPCShell in your {objdir}/dist/bin and execute the command pwd . | |||
<pre> | Again, {objdir} is a placeholder. | ||
</pre> | === Running all the tests === | ||
From the Fennec's objdir: | |||
<pre>make mochitest-robotium</pre> | |||
=== Running a single test === | |||
From the Fennec's objdir (using testLoad as an example): | |||
<pre>TEST_PATH=testLoad make mochitest-robotium</pre> | |||
= Writing tests = | |||
W.I.P. | |||
<pre> | <pre> | ||
make -C build/mobile/robocop/ | make -C build/mobile/robocop/ | ||
make package | make package | ||
edits