Mobile/Fennec/Android/Testing: Difference between revisions

Jump to navigation Jump to search
Line 380: Line 380:
Android mochitests and reftests are driven by test suites on a ''host'' machine running [https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/XPConnect/xpcshell xpcshell]. The Android device being driven is referred to as the ''target'' device. The test suite locates xpcshell on the host machine via the environment variable '''MOZ_HOST_BIN''', which must point to the directory that contains the <tt>xpcshell</tt> binary (executable on the host machine), its associated executables (<tt>certutil</tt>, <tt>pk12util</tt>, <tt>ssltunnel</tt>, etc), and its shared libraries.
Android mochitests and reftests are driven by test suites on a ''host'' machine running [https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/XPConnect/xpcshell xpcshell]. The Android device being driven is referred to as the ''target'' device. The test suite locates xpcshell on the host machine via the environment variable '''MOZ_HOST_BIN''', which must point to the directory that contains the <tt>xpcshell</tt> binary (executable on the host machine), its associated executables (<tt>certutil</tt>, <tt>pk12util</tt>, <tt>ssltunnel</tt>, etc), and its shared libraries.


'''When mach is used to run tests and MOZ_HOST_BIN has not been set, mach will download and setup host utilities for you.
'''When mach is used to run tests and MOZ_HOST_BIN has not been set, mach will download and setup host utilities for you. It is best to use that: don't set MOZ_HOST_BIN and let mach take of it.
'''
'''
=== Quick setup ===
If a change to the host utilities is required, follow [[Packaging Android host utilities|these instructions]].
 
You can download prebuilt host utilities:
 
{| class="wikitable"
|-
! Host architecture !! Size !! Download link
|-
| Mac OS X || 76MB || http://people.mozilla.org/~nalexander/host-utils/host-utils-37.0a2.en-US.mac.tar.xz
|-
| Linux (64-bit) || 46MB || http://people.mozilla.org/~nalexander/host-utils/host-utils-37.0a2.en-US.linux-x86_64.tar.xz
|-
| Linux (32-bit) || 46MB || http://people.mozilla.org/~nalexander/host-utils/host-utils-37.0a2.en-US.linux-i686.tar.xz
|}
 
Extract the archives using tar (or tar and xzip), like:
 
  cd ~/.mozbuild
  wget http://people.mozilla.org/~nalexander/host-utils/host-utils-37.0a2.en-US.mac.tar.xz
  tar Jxf host-utils-37.0a2.en-US.mac.tar.xz
  export MOZ_HOST_BIN=~/.mozbuild/host-utils.37.0a2.en-US.mac
 
Packaging the host utility archives listed above is easy: follow [[Packaging Android host utilities|these instructions]].


=== Advanced setup ===
=== Advanced setup ===
Confirmed users
1,759

edits

Navigation menu