Updates tests README.md for mach

This commit is contained in:
Gilles Leblanc 2014-09-11 23:15:33 -04:00
parent 8116ee1b34
commit d3dc61c984

View file

@ -15,7 +15,7 @@ In particular, this folder contains:
Running the tests Running the tests
================= =================
The simplest way to run the tests in Servo is `make check-wpt` in the build The simplest way to run the tests in Servo is `./mach test` in the root
directory. This will run the subset of JavaScript tests defined in directory. This will run the subset of JavaScript tests defined in
`include.ini` and log the output to stdout. `include.ini` and log the output to stdout.
@ -32,18 +32,16 @@ variable. Some useful options are:
Servo simultaneously to run multiple tests in parallel for more efficiency Servo simultaneously to run multiple tests in parallel for more efficiency
(especially on multi-core processors). (especially on multi-core processors).
Running the tests without make Running the tests without mach
------------------------------ ------------------------------
When avoiding `make` for some reason, one can run `run.py` directly. However, When avoiding `mach` for some reason, one can run `run.py` directly. However,
this requires in the first place that the virtualenv has been set up (which can this requires in the first place that the virtualenv has been set up. To set up
be done by running `make check-wpt` in advance). Then run from the build the virtualenv and run the tests run the following from the root directory:
directory:
source _virtualenv/bin/activate bash tests/wpt/run.sh
python $srcdir/src/test/wpt/run.py --config srcdir/src/test/wpt/config.ini
with any other desired arguments. You can substitute `bash` for another shell which supports `source`.
Running the tests manually Running the tests manually
-------------------------- --------------------------
@ -59,7 +57,7 @@ first adding the following to the system's hosts file:
127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test 127.0.0.1 xn--n8j6ds53lwwkrqhv28a.web-platform.test
127.0.0.1 xn--lve-6lad.web-platform.test 127.0.0.1 xn--lve-6lad.web-platform.test
and then running `python serve.py` from `src/tests/wpt/web-platform-tests`. and then running `python serve.py` from `tests/wpt/web-platform-tests`.
Then navigate Servo to `http://web-platform.test:8000/path/to/test`. Then navigate Servo to `http://web-platform.test:8000/path/to/test`.
Updating test expectations Updating test expectations
@ -73,13 +71,13 @@ remove `.ini` files that no longer contain any expectations.
When a larger number of changes is required, this process can be automated. When a larger number of changes is required, this process can be automated.
This first requires saving the raw, unformatted log from a test run, for This first requires saving the raw, unformatted log from a test run, for
example by running `WPTARGS=--log-raw /tmp/servo.log make check-wpt`. Once the example by running `./mach test-wpt --log-raw /tmp/servo.log`. Once the
log is saved, run from the build directory: log is saved, run from the root directory:
source _virtualenv/bin/activate source _virtualenv/bin/activate
_virtualenv/bin/wptupdate \ _virtualenv/bin/wptupdate \
--ignore-existing \ --ignore-existing \
--config $srcdir/src/test/wpt/config.ini \ --config tests/wpt/config.ini \
/tmp/servo.log /tmp/servo.log
This will update the `.ini` files under the `metadata` folder; commit those This will update the `.ini` files under the `metadata` folder; commit those