summaryrefslogtreecommitdiffstats
path: root/testing/mozbase/docs/mozversion.rst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/mozbase/docs/mozversion.rst
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/mozbase/docs/mozversion.rst')
-rw-r--r--testing/mozbase/docs/mozversion.rst70
1 files changed, 70 insertions, 0 deletions
diff --git a/testing/mozbase/docs/mozversion.rst b/testing/mozbase/docs/mozversion.rst
new file mode 100644
index 0000000000..a09e7cf8ec
--- /dev/null
+++ b/testing/mozbase/docs/mozversion.rst
@@ -0,0 +1,70 @@
+:mod:`mozversion` --- Get application information
+=================================================
+
+`mozversion <https://hg.mozilla.org/mozilla-central/file/tip/testing/mozbase/mozversion>`_
+provides version information such as the application name and the changesets
+that it has been built from. This is commonly used in reporting or for
+conditional logic based on the application under test.
+
+API Usage
+---------
+
+.. automodule:: mozversion
+ :members: get_version
+
+Examples
+````````
+
+Firefox::
+
+ import mozversion
+
+ version = mozversion.get_version(binary='/path/to/firefox-bin')
+ for (key, value) in sorted(version.items()):
+ if value:
+ print '%s: %s' % (key, value)
+
+Firefox for Android::
+
+ version = mozversion.get_version(binary='path/to/firefox.apk')
+ print version['application_changeset'] # gets hg revision of build
+
+Command Line Usage
+------------------
+
+mozversion comes with a command line program, ``mozversion`` which may be used to
+get version information from an application.
+
+Usage::
+
+ mozversion [options]
+
+Options
+```````
+
+---binary
+'''''''''
+
+This is the path to the target application binary or .apk. If this is omitted
+then the current directory is checked for the existence of an
+application.ini file. If not found, then it is assumed the target
+application is a remote Firefox OS instance.
+
+Examples
+````````
+
+Firefox::
+
+ $ mozversion --binary=/path/to/firefox-bin
+ application_buildid: 20131205075310
+ application_changeset: 39faf812aaec
+ application_name: Firefox
+ application_repository: http://hg.mozilla.org/releases/mozilla-release
+ application_version: 26.0
+ platform_buildid: 20131205075310
+ platform_changeset: 39faf812aaec
+ platform_repository: http://hg.mozilla.org/releases/mozilla-release
+
+Firefox for Android::
+
+ $ mozversion --binary=/path/to/firefox.apk