B2G/Hacking: Difference between revisions

Jump to navigation Jump to search
Line 220: Line 220:
Reftests are currently only supported on the emulator, though in theory they should run on other devices as well.
Reftests are currently only supported on the emulator, though in theory they should run on other devices as well.


# A few external packages are needed. First make sure you have pip (and preferably virtualenv), download http://people.mozilla.com/~ahalberstadt/runreftest-requirements.txt then run <pre>pip install -r runreftest-requirements.txt</pre>
* A few external packages are needed. First make sure you have pip (and preferably virtualenv), download http://people.mozilla.com/~ahalberstadt/runreftest-requirements.txt then run
# Either do:
pip install -r runreftest-requirements.txt
 
* Either do:
  cd objdir-gecko/_tests/reftest
  cd objdir-gecko/_tests/reftest
  ln -s <path_to_gecko_dir> tests
  ln -s <path_to_gecko_dir> tests
  python runreftestsb2g.py --b2gpath <path_to_b2g_repo> --adbpath <path_to_adb_binary> --xre-path <path_to_firefox_objdir>/dist/bin --emulator arm --emulator-res 800x1000 --remote-webserver 10.0.2.2 --ignore-windowsize <path_to_reftest_manifest>
  python runreftestsb2g.py --b2gpath <path_to_b2g_repo> --adbpath <path_to_adb_binary>
 
    --xre-path <path_to_firefox_objdir>/dist/bin --emulator arm --emulator-res 800x1000
 
    --remote-webserver 10.0.2.2 --ignore-windowsize <path_to_reftest_manifest>
#* xre-path is the path to a directory containing a desktop xpcshell binary. The one that is build with b2g will cause errors. Typically you can find it the objdir/dist/bin directory of a normal firefox build.
** xre-path is the path to a directory containing a desktop xpcshell binary. The one that is build with b2g will cause errors. Typically you can find it the objdir/dist/bin directory of a normal firefox build.
#* the reftest manifest is the path starting from the gecko root. E.g to run the main manifest you would put "layout/reftests/reftest.list"
** the reftest manifest is the path starting from the gecko root. E.g to run the main manifest you would put "layout/reftests/reftest.list"
# OR, set the $B2G_PATH, $ADB_PATH and $MOZ_HOST_BIN (maps to --xre-path) environment variables. Then run: <pre>export EXTRA_TEST_ARGS="--emulator arm --emulator-res 800x1000 --ignore-window-size" && make -C objdir-gecko reftest-b2g</pre>
* OR, set the $B2G_PATH, $ADB_PATH and $MOZ_HOST_BIN (maps to --xre-path) environment variables. Then run:
#* you can optionally also set $REFTEST_PATH to change the default manifest that gets run
export EXTRA_TEST_ARGS="--emulator arm --emulator-res 800x1000 --ignore-window-size" &&
    make -C objdir-gecko reftest-b2g
** you can optionally also set $REFTEST_PATH to change the default manifest that gets run


== Device API tests ==
== Device API tests ==


[[Category:New Contributor Landing Page]]
[[Category:New Contributor Landing Page]]
Confirmed users
656

edits

Navigation menu