Mobile/Fennec Xpcshell: Difference between revisions

Line 38: Line 38:


NOTE: this runs 593 tests where there are about 223 tests which run on Firefox.  We still need to figure out why these tests are in the tree, but not run.
NOTE: this runs 593 tests where there are about 223 tests which run on Firefox.  We still need to figure out why these tests are in the tree, but not run.
==Adding tests==
Add a directory named "tests" to the component. In the Makefile.in for the tests directory add a _TEST_FILES section with a list of the files in this directory needed to run the mochitest (the mochitest html file itself and any helper files). Then add this line to the bottom of the Makefile.in:
if test is in central code:
<pre>
libs:: $(_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
</pre>
if test is in mobile:
<pre>
libs:: $(_TEST_FILES)
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/../xulrunner/_tests/testing/mochitest/tests/$(relativesrcdir)
</pre>
When you build, the tests will be added to the xulrunner application's mochitest set.
Confirmed users
3,376

edits