Mobile/Fennec/Android/Testing: Difference between revisions

Jump to navigation Jump to search
Line 138: Line 138:
* All files are copied to /data/local/tests by default. On some devices, you may need to create /data/local/tests and make it world writable.
* All files are copied to /data/local/tests by default. On some devices, you may need to create /data/local/tests and make it world writable.


== reftests ==
== reftests (and crashtests and js-reftests) ==
[https://developer.mozilla.org/en/docs/Creating_reftest-based_unit_tests General reftest information.]
[https://developer.mozilla.org/en/docs/Creating_reftest-based_unit_tests General reftest information.]


There is no mach support for reftests yet (see {{bug|1087791}}) but you can run reftests with make.
Running reftests:
  mach reftest
  OR mach reftest <test-dir>
  OR mach reftest <test-dir>/<test-name>


First, ensure that MOZ_HOST_BIN has been set according to the [[Mobile/Fennec/Android#Host_Builds_.28MOZ_HOST_BIN.29|directions below]].
Use "find -name reftest.list" to find valid test directories.


   TEST_PATH=<path> make -C <objdir-droid> reftest-remote
Running crashtests:
 
   mach crashtest
Example TEST_PATH:
  OR mach crashtest <test-dir>
 
  OR mach crashtest <test-dir>/<test-name>
  TEST_PATH=layout/reftests/reftest-sanity/reftest.list


Use "find -name crashtest.list" to find valid test directories.
Running js-reftests:
  mach jstestbrowser
Notes:
Notes:


* If TEST_PATH is not specified, *all* reftests will be run -- that will take a long time.
* There are many reftests; trying to run them all at once is not recommended (takes a long time, may exhaust memory).
* Ensure that the device and host machine are on the same network.


== browser-chrome ==
== browser-chrome ==
Confirmed users
1,759

edits

Navigation menu