Skip to content

Commit

Permalink
Merge pull request #115 from w3c/sideshowbarker/docs
Browse files Browse the repository at this point in the history
[docs] Sync docs to current wptrunner behavior.
  • Loading branch information
jgraham committed Jun 8, 2015
2 parents 6258375 + 7d0b48f commit ba7f018
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 16 deletions.
33 changes: 23 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ following are most significant:
``--product`` (defaults to `firefox`)
The product to test against: `b2g`, `chrome`, `firefox`, or `servo`.

``--binary`` (required)
``--binary`` (required if product is `firefox` or `servo`)
The path to a binary file for the product (browser) to test against.

``--webdriver-binary`` (required if product is `chrome`)
The path to a `*driver` binary; e.g., a `chromedriver` binary.

``--certutil-binary`` (required if product is `firefox` [#]_)
The path to a `certutil` binary (for tests that must be run over https).

``--metadata`` (required)
The path to a directory containing test metadata. [#]_

Expand All @@ -37,6 +43,9 @@ following are most significant:
``--prefs-root`` (required only when testing a Firefox binary)
The path to a directory containing Firefox test-harness preferences. [#]_

.. [#] The ``--certutil-binary`` option is required when the product is
``firefox`` unless ``--ssl-type=none`` is specified.
.. [#] The ``--metadata`` path is to a directory that contains:
* a ``MANIFEST.json`` file (the web-platform-tests documentation has
Expand All @@ -56,26 +65,29 @@ To test a Firefox Nightly build in an OS X environment, you might start
wptrunner using something similar to the following example::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=~/mozilla-central/obj-x86_64-apple-darwin14.0.0/dist/Nightly.app/Contents/MacOS/firefox \
--prefs-root=~/mozilla-central/testing/profiles
--binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/dist/Nightly.app/Contents/MacOS/firefox \
--certutil-binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/security/nss/cmd/certutil/certutil \
--prefs-root=~/mozilla-central/testing/profiles

And to test a Chromium build in an OS X environment, you might start
wptrunner using something similar to the following example::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=~/chromium/src/out/Release/Chromium.app/Contents/MacOS/Chromium \
--product=chrome
--binary=~/chromium/src/out/Release/Chromium.app/Contents/MacOS/Chromium \
--webdriver-binary=/usr/local/bin/chromedriver --product=chrome

-------------------------------------
Example: How to run a subset of tests
-------------------------------------

To restrict a test run just to tests in a particular web-platform-tests
subdirectory, use ``--include`` with the directory name; for example::
subdirectory, specify the directory name in the positional arguments after
the options; for example, run just the tests in the `dom` subdirectory::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=/path/to/firefox --prefs-root=/path/to/testing/profiles \
--include=dom
--binary=/path/to/firefox --certutil-binary=/path/to/certutil \
--prefs-root=/path/to/testing/profiles \
dom

Output
~~~~~~
Expand All @@ -95,8 +107,9 @@ log to a file and a human-readable summary to stdout, you might start
wptrunner using something similar to the following example::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=/path/to/firefox --prefs-root=/path/to/testing/profiles
--log-raw=output.log --log-mach=-
--binary=/path/to/firefox --certutil-binary=/path/to/certutil \
--prefs-root=/path/to/testing/profiles \
--log-raw=output.log --log-mach=-

Expectation Data
~~~~~~~~~~~~~~~~
Expand Down
25 changes: 19 additions & 6 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ takes multiple options, of which the following are most significant:
``--product`` (defaults to `firefox`)
The product to test against: `b2g`, `chrome`, `firefox`, or `servo`.

``--binary`` (required)
``--binary`` (required if product is `firefox` or `servo`)
The path to a binary file for the product (browser) to test against.

``--webdriver-binary`` (required if product is `chrome`)
The path to a `*driver` binary; e.g., a `chromedriver` binary.

``--certutil-binary`` (required if product is `firefox` [#]_)
The path to a `certutil` binary (for tests that must be run over https).

``--metadata`` (required only when not `using default paths`_)
The path to a directory containing test metadata. [#]_

Expand All @@ -68,6 +74,9 @@ takes multiple options, of which the following are most significant:
``--prefs-root`` (required only when testing a Firefox binary)
The path to a directory containing Firefox test-harness preferences. [#]_

.. [#] The ``--certutil-binary`` option is required when the product is
``firefox`` unless ``--ssl-type=none`` is specified.
.. [#] The ``--metadata`` path is to a directory that contains:
* a ``MANIFEST.json`` file (the web-platform-tests documentation has
Expand All @@ -89,26 +98,30 @@ To test a Firefox Nightly build in an OS X environment, you might start
wptrunner using something similar to the following example::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=~/mozilla-central/obj-x86_64-apple-darwin14.0.0/dist/Nightly.app/Contents/MacOS/firefox \
--binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/dist/Nightly.app/Contents/MacOS/firefox \
--certutil-binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/security/nss/cmd/certutil/certutil \
--prefs-root=~/mozilla-central/testing/profiles


And to test a Chromium build in an OS X environment, you might start
wptrunner using something similar to the following example::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=~/chromium/src/out/Release/Chromium.app/Contents/MacOS/Chromium \
--product=chrome
--webdriver-binary=/usr/local/bin/chromedriver --product=chrome

--------------------
Running test subsets
--------------------

To restrict a test run just to tests in a particular web-platform-tests
subdirectory, use ``--include`` with the directory name; for example::
subdirectory, specify the directory name in the positional arguments after
the options; for example, run just the tests in the `dom` subdirectory::

wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
--binary=/path/to/firefox --prefs-root=/path/to/testing/profiles \
--include=dom
--binary=/path/to/firefox --certutil-binary=/path/to/certutil \
--prefs-root=/path/to/testing/profiles \
dom

-------------------
Running in parallel
Expand Down

0 comments on commit ba7f018

Please sign in to comment.