Changes

Jump to: navigation, search

Auto-tools/Projects/Robocop

971 bytes added, 02:32, 23 March 2012
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
=== Step two: Build and install native 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, then execute the mochitest-robotium make target. MOZ_HOST_BIN must point to should live in a desktop build or other location that provides xpcshell for desktopseparate folder === Step three: $MOZ_HOST_BIN/xpcshell must be executable on your build machine (not Install Native Fennec ===Run the following commands in sequence, from the device!). Fennec source directory:<pre>make -f client.mkcd {objdir}
make package
adb install dist/fennec-*.apk</pre> export MOZ_HOST_BIN=~/* NOTE *: {objdir-x86/dist/bin} is a placeholder; the name of your object directory should not matter.make mochitest-robotium</pre>= Running tests =
If you want === Set up the MOZ_HOST_BIN environment variable ===The MOZ_HOST_BIN variable will need to be set to run just a single testthe 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 example "testLoad"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, you can set it as simply locate XPCShell in your TEST_PATH while running like so:{objdir}/dist/bin and execute the command pwd .
Again, {objdir} is a placeholder. === Running all the tests ===From the Fennec's objdir:<pre>TEST_PATH=testLoad make mochitest-robotium</pre>
For === Running a single test ===From the Fennec's objdir (using testLoad as an incremental build, you can replace the example):<pre>TEST_PATH=testLoad make commands above with:mochitest-robotium</pre>
= Writing tests =
W.I.P.
<pre>
cd objdir
make -C build/mobile/robocop/
make package
76
edits

Navigation menu