Bug 1133076 - Add documentation for mozinstall. r=ahal
authorWilliam Lachance <wlachance@mozilla.com>
Tue, 17 Feb 2015 13:48:17 -0500
changeset 256668 d979b7a7ed9c1f3c323ebf2357b98c96eeca0f18
parent 256667 c4268a5f1bc9144a1c895aca6701f686c557d39d
child 256669 58acfa044b49cc547a5d55cfb8d1992d9f8df5cd
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1133076
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1133076 - Add documentation for mozinstall. r=ahal
testing/mozbase/docs/mozinstall.rst
testing/mozbase/docs/setuprunning.rst
testing/mozbase/mozinstall/mozinstall/mozinstall.py
new file mode 100644
--- /dev/null
+++ b/testing/mozbase/docs/mozinstall.rst
@@ -0,0 +1,29 @@
+:mod:`mozinstall` --- Install and uninstall Gecko-based applications
+====================================================================
+
+mozinstall is a small python module with several convenience methods
+useful for installing and uninstalling a gecko-based application
+(e.g. Firefox) on the desktop.
+
+Simple example
+--------------
+
+::
+
+    import mozinstall
+    import tempfile
+
+    tempdir = tempfile.mkdtemp()
+    firefox_dmg = 'firefox-38.0a1.en-US.mac.dmg'
+    install_folder = mozinstall.install(src=firefox_dmg, dest=tempdir)
+    binary = mozinstall.get_binary(install_folder, 'Firefox')
+    # from here you can execute the binary directly
+    # ...
+    mozinstall.uninstall(install_folder)
+
+API Documentation
+-----------------
+
+.. automodule:: mozinstall
+   :members: is_installer, install, get_binary, uninstall,
+             InstallError, InvalidBinary, InvalidSource
--- a/testing/mozbase/docs/setuprunning.rst
+++ b/testing/mozbase/docs/setuprunning.rst
@@ -5,13 +5,14 @@ Activities under this domain include ins
 a profile (a set of configuration settings), running a program in a
 controlled environment such that it can be shut down safely, and
 correctly handling the case where the system crashes.
 
 .. toctree::
    :maxdepth: 2
 
    mozfile
+   mozinstall
    mozprofile
    mozprocess
    mozrunner
    mozcrash
    mozdebug
--- a/testing/mozbase/mozinstall/mozinstall/mozinstall.py
+++ b/testing/mozbase/mozinstall/mozinstall/mozinstall.py
@@ -1,16 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
-"""Module to handle the installation and uninstallation of Gecko based
-applications across platforms.
-
-"""
 from optparse import OptionParser
 import os
 import shutil
 import subprocess
 import sys
 import tarfile
 import time
 import zipfile