gecko/testing/mozbase/mozdevice
William Lachance 54d781abf7 Bug 795496 - Make mozdevice raise exceptions on error;r=ahal,jmaher
It turns out that relying on the user to check return codes for every
command was non-intuitive and resulted in many hard to trace bugs.
Now most functinos just return "None", and raise a DMError when there's an
exception. The exception to this are functions like dirExists, which now return
booleans, and throw exceptions on error. This is a fairly major refactor,
and also involved the following internal changes:

* Removed FileError and AgentError exceptions, replaced with DMError
  (having to manage three different types of exceptions was confusing,
  all the more so when we're raising them)
* Docstrings updated to remove references to return values where no
  longer relevant
* pushFile no longer will create a directory to accomodate the file
  if it doesn't exist (this makes it consistent with devicemanagerADB)
* dmSUT we validate the file, but assume that we get something back
  from the agent, instead of falling back to manual validation in the
  case that we didn't
* isDir and dirExists had the same intention, but different
  implementations for dmSUT. Replaced the dmSUT impl of getDirectory
  with that of isDir's (which was much simpler). Removed
  isDir from devicemanager.py, since it wasn't used externally
* killProcess modified to check for process existence before running
  (since the actual internal kill command will throw an exception
  if the process doesn't exist)

In addition to all this, more unit tests have been added to test these
changes for devicemanagerSUT.
2012-10-04 11:28:07 -04:00
..
mozdevice Bug 795496 - Make mozdevice raise exceptions on error;r=ahal,jmaher 2012-10-04 11:28:07 -04:00
sut_tests Bug 791716 - mirror mozbase -> m-c for week of Sept 17, 2012;r=wlach 2012-09-17 15:13:45 -07:00
tests Bug 795496 - Make mozdevice raise exceptions on error;r=ahal,jmaher 2012-10-04 11:28:07 -04:00
README.md Bug 723107 - Re-add mozdevice to testing/mozbase, remove duplicate files in build/mobile;r=jmaher 2012-09-07 16:00:31 -04:00
setup.py Bug 795943 - Mirror mozbase -> m-c for week of Oct 1 @ 22aa0aee78;r=wlach 2012-10-01 14:00:55 -07:00

mozdevice provides an interface to interact with a remote device such as an Android phone connected to a workstation. Currently there are two implementations of the interface: one uses a TCP-based protocol to communicate with a server running on the device, another uses Android's adb utility.