Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CSS tests. #19070

Merged
merged 11 commits into from Nov 2, 2017
Prev

Remove all outdated CSS-related mach commands.

  • Loading branch information
jdm committed Nov 2, 2017
commit 28c20988f0d8137d30b458f24aef75d7cb3f764f
@@ -52,9 +52,6 @@
"paths": [path.abspath(WEB_PLATFORM_TESTS_PATH),
path.abspath(SERVO_TESTS_PATH)],
"include_arg": "include"}),
("css", {"kwargs": {"release": False},
"paths": [path.abspath(path.join("tests", "wpt", "css-tests"))],
"include_arg": "include"}),
("unit", {"kwargs": {},
"paths": [path.abspath(path.join("tests", "unit"))],
"include_arg": "test_name"}),
@@ -115,7 +112,6 @@ def test(self, params, render_mode=DEFAULT_RENDER_MODE, release=False, tidy_all=
suites["tidy"]["kwargs"] = {"all_files": tidy_all, "no_progress": no_progress, "self_test": self_test,
"stylo": False}
suites["wpt"]["kwargs"] = {"release": release}
suites["css"]["kwargs"] = {"release": release}
suites["unit"]["kwargs"] = {}
suites["compiletest"]["kwargs"] = {"release": release}

@@ -609,41 +605,6 @@ def test_dromaeo(self, tests, release, dev):
def update_jquery(self, release, dev):
return self.jquery_test_runner("update", release, dev)

@Command('test-css',
description='Run the web platform CSS tests',
category='testing',
parser=create_parser_wpt)
def test_css(self, **kwargs):
self.ensure_bootstrapped()
ret = self.run_test_list_or_dispatch(kwargs["test_list"], "css", self._test_css, **kwargs)
if kwargs["always_succeed"]:
return 0
else:
return ret

def _test_css(self, **kwargs):
run_file = path.abspath(path.join("tests", "wpt", "run_css.py"))
return self.wptrunner(run_file, **kwargs)

@Command('update-css',
description='Update the web platform CSS tests',
category='testing',
parser=updatecommandline.create_parser())
@CommandArgument('--patch', action='store_true', default=False,
help='Create an mq patch or git commit containing the changes')
def update_css(self, patch, **kwargs):
self.ensure_bootstrapped()
run_file = path.abspath(path.join("tests", "wpt", "update_css.py"))
kwargs["no_patch"] = not patch

if kwargs["no_patch"] and kwargs["sync"]:
print("Are you sure you don't want a patch?")
return 1

run_globals = {"__file__": run_file}
execfile(run_file, run_globals)
return run_globals["update_tests"](**kwargs)

@Command('compare_dromaeo',
description='Compare outputs of two runs of ./mach test-dromaeo command',
category='testing')
@@ -51,7 +51,6 @@ files = [
"./components/style/gecko/generated/atom_macro.rs",
"./resources/hsts_preload.json",
"./tests/wpt/metadata/MANIFEST.json",
"./tests/wpt/metadata-css/MANIFEST.json",
"./components/script/dom/webidls/ForceTouchEvent.webidl",
"./support/android/openssl.sh",
# Ignore those files since the issues reported are on purpose
@@ -65,13 +64,11 @@ files = [
directories = [
# Upstream
"./support/android/apk",
"./tests/wpt/css-tests",
"./tests/wpt/harness",
"./tests/wpt/update",
"./tests/wpt/web-platform-tests",
"./tests/wpt/mozilla/tests/mozilla/referrer-policy",
"./tests/wpt/sync",
"./tests/wpt/sync_css",
"./python/tidy/servo_tidy_tests",
"./components/script/dom/bindings/codegen/parser",
"./components/script/dom/bindings/codegen/ply",
@@ -1,4 +1,4 @@
This folder contains the web platform tests, CSS WG tests, and the
This folder contains the web platform tests and the
code required to integrate them with Servo.
To learn how to write tests, go [here](http://web-platform-tests.org/writing-tests/index.html).

@@ -9,15 +9,10 @@ In particular, this folder contains:

* `config.ini`: some configuration for the web-platform-tests.
* `include.ini`: the subset of web-platform-tests we currently run.
* `config_css.ini`: some configuration for the CSSWG tests.
* `include_css.ini`: the subset of the CSSWG tests we currently run.
* `run_wpt.py`: glue code to run the web-platform-tests in Servo.
* `run_css.py`: glue code to run the CSSWG tests in Servo.
* `run.py`: common code used by `run_wpt.py` and `run_css.py`.
* `run.py`: common code used by `run_wpt.py`.
* `web-platform-tests`: copy of the web-platform-tests.
* `metadata`: expected failures for the web-platform-tests we run.
* `css-tests`: copy of the built CSSWG tests.
* `metadata-css`: expected failures for the CSSWG tests we run.
* `mozilla`: web-platform-tests that cannot be upstreamed.

Running the tests
@@ -28,8 +23,6 @@ test-wpt` in the root directory. This will run the subset of
JavaScript tests defined in `include.ini` and log the output to
stdout.

Similarly the CSSWG tests can be run using `./mach test-css`.

A subset of tests may be run by providing positional arguments to the
mach command, either as filesystem paths or as test urls e.g.

@@ -56,10 +49,9 @@ test with `mach test-wpt --release`
Running the tests without mach
------------------------------

When avoiding `mach` for some reason, one can run either `run_wpt.py`
ir `run_css.py` directly. However, this requires that all the
dependencies for `wptrunner` are avaliable in the current python
environment.
When avoiding `mach` for some reason, one can run `run_wpt.py`
directly. However, this requires that all the dependencies for
`wptrunner` are avaliable in the current python environment.

Running the tests manually
--------------------------
@@ -135,9 +127,6 @@ log is saved, run from the root directory:

./mach update-wpt /tmp/servo.log

For CSSWG tests a similar prcedure works, with `./mach test-css` and
`./mach update-css`.

Writing new tests
=================

@@ -167,11 +156,6 @@ web-platform-tests may be edited in-place and the changes committed to
the servo tree. These changes will be upstreamed when the tests are
next synced.

For CSS tests this kind of in-place update is not possible because the
tests have a build step before they are pulled into the servo
repository. Therefore corrections must be submitted directly to the
source repository.

Updating the upstream tests
===========================

@@ -183,8 +167,7 @@ commands. e.g. to update the web-platform-tests:
./mach update-wpt update.log

This should create two commits in your servo repository with the
updated tests and updated metadata. The same process works for the
CSSWG tests, using the `update-css` and `test-css` mach commands.
updated tests and updated metadata.

Servo-specific tests
====================
@@ -200,7 +183,7 @@ Analyzing reftest results
Reftest results can be analyzed from a raw log file. To generate this run
with the `--log-raw` option e.g.

./mach test-css --log-raw css.log
./mach test-wpt --log-raw wpt.log

This file can then be fed into the
[reftest analyzer](http://hoppipolla.co.uk/410/reftest-analyser-structured.xhtml)

This file was deleted.

This file was deleted.

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.