Bug 1591835 [wpt PR 19940] - [docs] describe required system setup in more detail, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Mon, 04 Nov 2019 11:45:24 +0000
changeset 502972 0aee8b728e0424c1909239b36d21ebb6547e17b1
parent 502971 d4d00a91ad92dcfe5d595b950f5224514e5b43c4
child 502973 cab0f916a2260616b9ad4c1da1451a7a3070039e
push id101053
push userwptsync@mozilla.com
push dateWed, 20 Nov 2019 11:26:19 +0000
treeherderautoland@3a7cd133fa3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1591835, 19940, 20035
milestone72.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 1591835 [wpt PR 19940] - [docs] describe required system setup in more detail, a=testonly Automatic update from web-platform-tests [docs] describe required system setup in more detail (#19940) * [docs] describe required system setup in more detail The recommendation to use WSL is from https://github.com/web-platform-tests/wpt/pull/8183 and is removed, as with Windows 10 the required setup is fairly modest. Anyone using WSL can simply follow the Linux instructions. * Revert Fedora documentation https://github.com/web-platform-tests/wpt/issues/20035 * Use .bash_profile * Mention WSL -- wpt-commits: dd8b3c711e034e06372a5fe356bfbaf45100433c wpt-pr: 19940 Differential Revision: https://phabricator.services.mozilla.com/D53594
testing/web-platform/tests/docs/running-tests/from-local-system.md
--- a/testing/web-platform/tests/docs/running-tests/from-local-system.md
+++ b/testing/web-platform/tests/docs/running-tests/from-local-system.md
@@ -1,69 +1,93 @@
 # Running Tests from the Local System
 
 The tests are designed to be run from your local computer.
 
 ## System Setup
 
-The test environment requires [Python 2.7+](http://www.python.org/downloads)
-(but not Python 3.x).
+Running the tests requires `python`, `pip` and `virtualenv`, as well as updating
+the system `hosts` file.
+
+Note that Python 2.7 is required. Using Python 3 is not supported.
+
+The required setup is different depending on your operating system.
+
+### Linux Setup
 
-On Windows, be sure to add the Python directory (`c:\python2x`, by default) to
-your `%Path%` [Environment Variable](http://www.computerhope.com/issues/ch000549.htm),
-and read the [Windows Notes](#windows-notes) section below.
+If not already present, use the system package manager to install `python`,
+`pip` and `virtualenv`.
+
+On Debian or Ubuntu:
+
+```bash
+sudo apt-get install python python-pip virtualenv
+```
+
+### macOS Setup
+
+The system-provided Python can be used, while `pip` and `virtualenv` can be
+installed for the user only:
 
-<!--
-  There does not appear to be a cross-platform means of installing `pip`.
-  https://github.com/web-platform-tests/wpt/pull/16670
--->
+```bash
+python -m ensurepip --user
+export PATH="$PATH:$HOME/Library/Python/2.7/bin"
+pip install --user virtualenv
+```
+
+To make the `PATH` change persistent, add it to your `~/.bash_profile` file or
+wherever you currently set your PATH.
+
+See also [additional setup required to run Safari](safari).
 
-Install `pip`. On many systems, this can be achieved with the command `python
--m ensurepip`. If this is not possible, use your system's package manager to
-install the `python-pip` package.
+### Windows Setup
+**Note:** In general, Windows Subsystem for Linux will provide the smoothest
+user experience for running web-platform-tests on Windows, where installation
+and usage are similar to Linux.
 
-Next, install `virtualenv` using the following command:
+Download and install [Python 2.7](https://www.python.org/downloads). The
+installer includes `pip` by default.
+
+Add `C:\Python27` and `C:\Python27\Scripts` to your `%Path%`
+[environment variable](http://www.computerhope.com/issues/ch000549.htm).
+
+Finally, install `virtualenv`:
 
 ```bash
 pip install virtualenv
 ```
 
+The standard Windows shell requires that all `wpt` commands are prefixed
+by the Python binary i.e. assuming `python` is on your path the server is
+started using:
+
+```bash
+python wpt serve
+```
+
+### `hosts` File Setup
+
 To get the tests running, you need to set up the test domains in your
 [`hosts` file](http://en.wikipedia.org/wiki/Hosts_%28file%29%23Location_in_the_file_system).
 
-The necessary content can be generated with `./wpt make-hosts-file`; on
-Windows, you will need to preceed the prior command with `python` or
-the path to the Python binary (`python wpt make-hosts-file`).
-
-For example, on most UNIX-like systems, you can setup the hosts file with:
+On Linux, macOS or other UNIX-like system:
 
 ```bash
 ./wpt make-hosts-file | sudo tee -a /etc/hosts
 ```
 
 And on Windows (this must be run in a PowerShell session with Administrator privileges):
 
 ```bash
 python wpt make-hosts-file | Out-File %SystemRoot%\System32\drivers\etc\hosts -Encoding ascii -Append
 ```
 
 If you are behind a proxy, you also need to make sure the domains above are
 excluded from your proxy lookups.
 
-### Windows Notes
-
-Generally Windows Subsystem for Linux will provide the smoothest user
-experience for running web-platform-tests on Windows.
-
-The standard Windows shell requires that all `wpt` commands are prefixed
-by the Python binary i.e. assuming `python` is on your path the server is
-started using:
-
-`python wpt serve`
-
 ## Via the browser
 
 The test environment can then be started using
 
     ./wpt serve
 
 This will start HTTP servers on two ports and a websockets server on
 one port. By default the web servers start on ports 8000 and 8443 and the other