testing/mozbase/docs/mozversion.rst

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testing/mozbase/docs/mozversion.rst	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,78 @@
     1.4 +:mod:`mozversion` --- Get application information
     1.5 +=================================================
     1.6 +
     1.7 +`mozversion <https://github.com/mozilla/mozbase/tree/master/mozversion>`_
     1.8 +provides version information such as the application name and the changesets
     1.9 +that it has been built from. This is commonly used in reporting or for
    1.10 +conditional logic based on the application under test.
    1.11 +
    1.12 +API Usage
    1.13 +---------
    1.14 +
    1.15 +.. automodule:: mozversion
    1.16 +    :members: get_version
    1.17 +
    1.18 +
    1.19 +Command Line Usage
    1.20 +------------------
    1.21 +
    1.22 +mozversion comes with a command line program, ``mozversion`` which may be used to
    1.23 +get version information from an application.
    1.24 +
    1.25 +Usage::
    1.26 +
    1.27 +    mozversion [options]
    1.28 +
    1.29 +Options
    1.30 +```````
    1.31 +
    1.32 +---binary
    1.33 +'''''''''
    1.34 +
    1.35 +This is the path to the target application binary. If this is omitted then
    1.36 +the current directory is checked for the existance of an application.ini file.
    1.37 +If not found, then it is assumed the target application is a remote Firefox OS
    1.38 +instance.
    1.39 +
    1.40 +
    1.41 +---sources
    1.42 +''''''''''
    1.43 +
    1.44 +The path to the sources.xml that accompanies the target application (Firefox OS
    1.45 +only). If this is omitted then the current directory is checked for the
    1.46 +existance of a sources.xml file.
    1.47 +
    1.48 +Examples
    1.49 +````````
    1.50 +
    1.51 +Firefox::
    1.52 +
    1.53 +    $ mozversion --binary=/path/to/firefox-bin
    1.54 +    application_buildid: 20131205075310
    1.55 +    application_changeset: 39faf812aaec
    1.56 +    application_name: Firefox
    1.57 +    application_repository: http://hg.mozilla.org/releases/mozilla-release
    1.58 +    application_version: 26.0
    1.59 +    platform_buildid: 20131205075310
    1.60 +    platform_changeset: 39faf812aaec
    1.61 +    platform_repository: http://hg.mozilla.org/releases/mozilla-release
    1.62 +
    1.63 +Firefox OS::
    1.64 +
    1.65 +    $ mozversion --sources=/path/to/sources.xml
    1.66 +    application_buildid: 20140106040201
    1.67 +    application_changeset: 14ac61461f2a
    1.68 +    application_name: B2G
    1.69 +    application_repository: http://hg.mozilla.org/mozilla-central
    1.70 +    application_version: 29.0a1
    1.71 +    build_changeset: 59605a7c026ff06cc1613af3938579b1dddc6cfe
    1.72 +    device_firmware_date: 1380051975
    1.73 +    device_firmware_version_incremental: 139
    1.74 +    device_firmware_version_release: 4.0.4
    1.75 +    device_id: msm7627a
    1.76 +    gaia_changeset: 9a222ac02db176e47299bb37112ae40aeadbeca7
    1.77 +    gaia_date: 1389005812
    1.78 +    gecko_changeset: 3a2d8af198510726b063a217438fcf2591f4dfcf
    1.79 +    platform_buildid: 20140106040201
    1.80 +    platform_changeset: 14ac61461f2a
    1.81 +    platform_repository: http://hg.mozilla.org/mozilla-central

mercurial