Mobile/Fennec Mochitest

From MozillaWiki
< Mobile
Revision as of 08:28, 19 June 2008 by Harthur (talk | contribs) (New page: ==Getting the Tests== Edit your mozconfig to contain the following lines: <pre> ac_add_options --enable-tests ac_add_options --enable-mochitest </pre> Get the source and build according ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Getting the Tests

Edit your mozconfig to contain the following lines:

ac_add_options --enable-tests
ac_add_options --enable-mochitest

Get the source and build according to instructions.

Porting tests to N800

If following directions for running fennec on N800/N810 devices, also transfer the _tests directory to the device. From your objdir:

cd xulrunner
tar chf tests.tar _tests

Transfer tar file to device via scp so that tests.tar is in the same directory as the xulrunner and fennec packages. In order for the tests to run properly on the mobile, some of the directory structure of the original tree must be preserved so after untarring all the mobile packages, run this on the device:

mv xulrunner bin
mkdir xulrunner; mkdir xulrunner/dist
mv bin xulrunner/dist/bin
mv _tests xulrunner/_tests

Running the tests

Run the tests from the objdir with:

cd xulrunner/_tests/testing/mochitest
python runtests.py --appname=<fennec executable>

where fennec executable is the absolute path to the fennec executable, /root/fennec/fennec, e.g. Additional arguments like individual test files can be specified, general Mochitest instructions can be found here [1].