mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
c5f092dab4
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. |
||
---|---|---|
.. | ||
manifestdestiny | ||
mozb2g | ||
mozcrash | ||
mozdevice | ||
mozfile | ||
mozhttpd | ||
mozinfo | ||
mozinstall | ||
mozlog | ||
mozprocess | ||
mozprofile | ||
mozrunner | ||
moztest | ||
docs.manifest | ||
generate_diff.py | ||
Makefile.in | ||
README | ||
setup_development.py | ||
test-manifest.ini | ||
test.py |
This is the git repository for the Mozilla mozbase suite of python utilities. MozBase is composed of several python packages. These packages work together to form the basis of a test harness. * Firefox is launched via [mozrunner](https://github.com/mozilla/mozbase/tree/master/mozrunner) ** which sets up a profile with preferences and extensions using [mozprofile ](https://github.com/mozilla/mozbase/tree/master/mozprofile) ** and runs the application under test using [mozprocess](https://github.com/mozilla/mozbase/tree/master/mozprocess) * [mozInstall](https://github.com/mozilla/mozbase/tree/master/mozinstall) is used to install the test application * A test harness may direct Firefox to load web pages. These may be served using [mozhttpd](https://github.com/mozilla/mozbase/tree/master/mozhttpd) for testing * The machine environment is introspected by [mozinfo](https://github.com/mozilla/mozbase/tree/master/mozinfo) * A test manifest may be read to determine the tests to be run. These manifests are processed by [ManifestDestiny](https://github.com/mozilla/mozbase/tree/master/manifestdestiny) * For mobile testing, the test runner communicates to the test agent using [mozdevice](https://github.com/mozilla/mozbase/tree/master/mozdevice) Learn more about mozbase here: https://wiki.mozilla.org/Auto-tools/Projects/MozBase Bugs live at https://bugzilla.mozilla.org/buglist.cgi?resolution=---&component=Mozbase&product=Testing and https://bugzilla.mozilla.org/buglist.cgi?resolution=---&status_whiteboard_type=allwordssubstr&query_format=advanced&status_whiteboard=mozbase To file a bug, go to https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Mozbase