Confirmed users
1,759
edits
Line 429: | Line 429: | ||
* Ensure that the device and host machine are on the same network. | * Ensure that the device and host machine are on the same network. | ||
=== | === mochitest-plain === | ||
Pre-requisites: | |||
* Ensure that MOZ_HOST_BIN has been set according to the [[Mobile/Fennec/Android#Host_Builds_.28MOZ_HOST_BIN.29|directions above]]. | |||
* Ensure your device is connected and visible with "adb devices". | |||
* '''Ensure that the device and host machine are on the same network''' <-- This is important. The device and the host need to communicate over the network to run the tests. Having the device connected to the host via USB is '''not''' sufficient. | |||
Running tests: | |||
mach mochitest-plain | |||
OR mach mochitest-plain <test-dir> | |||
OR mach mochitest-plain <test-dir>/<test-name> | |||
Use "find -name mochitest.ini" to find valid test directories. | |||
Notes: | |||
* Currently the mach command only supports the adb device manager. | |||
* You can also run tests using make -C $OBJDIR mochitest-remote, but this is deprecated. Use TEST_PATH=<test-dir>/<test-name> or TEST_PATH=<test-dir> to run a subset of tests. | |||
** A rooted device is required to run the unit tests using the SUT Agent. Use ADB for unrooted devices (see [[https://wiki.mozilla.org/Mobile/Fennec/Android#Device_Managers]]). | |||
** Currently using ADB and using /data/local/tests on a non-rooted phone causes setting TEST_PATH to a directory rather than an individual HTML file to fail, and SpecialPowers tests to fail too - filed as {{bug|822652}} | |||
=== mochitest-chrome === | |||
Pre-requisites: | |||
* Ensure that MOZ_HOST_BIN has been set according to the [[Mobile/Fennec/Android#Host_Builds_.28MOZ_HOST_BIN.29|directions above]]. | |||
* Ensure your device is connected and visible with "adb devices". | |||
* '''Ensure that the device and host machine are on the same network''' <-- This is important. The device and the host need to communicate over the network to run the tests. Having the device connected to the host via USB is '''not''' sufficient. | |||
Running tests: | |||
mach mochitest-chrome | |||
OR mach mochitest-chrome <test-dir> | |||
OR mach mochitest-chrome <test-dir>/<test-name> | |||
Use "find -name chrome.ini" to find valid test directories. | |||
Notes: | Notes: | ||
* | * Currently the mach command only supports the adb device manager. | ||
* You can also run tests using make -C $OBJDIR mochitest-remote, but this is deprecated. Use TEST_PATH=<test-dir>/<test-name> or TEST_PATH=<test-dir> to run a subset of tests. | |||
* | * mochitest-chrome on Android is not run in continuous integration on treeherder; many tests may fail. | ||
=== Robocop === | === Robocop === |