Title: [191043] trunk
Revision
191043
Author
youenn.fab...@crf.canon.fr
Date
2015-10-14 05:37:14 -0700 (Wed, 14 Oct 2015)

Log Message

Update web-platform-tests tools to the latest revision
https://bugs.webkit.org/show_bug.cgi?id=149645

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Removed tools folder.
Updated ImportExpectations and TestRepositories files to match latest wpt repo revision.
Updated web-platform-tests using the import tool.

* resources/ImportExpectations: Skipping new test suites.
* resources/TestRepositories: Updating revision of default imported web-platform-tests. Disabled conversion of git submodules information.
* resources/web-platform-tests-modules.json: Updated by hand the modules description to align with wpt repo.
* web-platform-tests/.gitignore: Marking tools folder as ignored.
* web-platform-tests/README.md:
* web-platform-tests/common/w3c-import.log:
* web-platform-tests/config.default.json:
* web-platform-tests/domparsing/w3c-import.log:
* web-platform-tests/lint: Added.
* web-platform-tests/lint.whitelist: Renamed from LayoutTests/imported/w3c/web-platform-tests/tools/scripts/lint.whitelist.
* web-platform-tests/manifest: Added.
* web-platform-tests/serve: Added.
* web-platform-tests/serve.py:
(main):
* web-platform-tests/tools/__init__.py: Removed.
* web-platform-tests/tools/runner/css/bootstrap-theme.min.css: Removed.
* web-platform-tests/tools/runner/css/bootstrap.min.css: Removed.
* web-platform-tests/tools/runner/css/w3c-import.log: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.eot: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.svg: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.ttf: Removed.
* web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.woff: Removed.
* web-platform-tests/tools/runner/fonts/w3c-import.log: Removed.
* web-platform-tests/tools/runner/logo.svg: Removed.
* web-platform-tests/tools/runner/report.css: Removed.
* web-platform-tests/tools/runner/report.py: Removed.
* web-platform-tests/tools/runner/runner.css: Removed.
* web-platform-tests/tools/runner/runner.js: Removed.
* web-platform-tests/tools/runner/update_manifest.py: Removed.
* web-platform-tests/tools/runner/w3c-import.log: Removed.
* web-platform-tests/tools/scripts/__init__.py: Removed.
* web-platform-tests/tools/scripts/_env.py: Removed.
* web-platform-tests/tools/scripts/html5lib_test.xml: Removed.
* web-platform-tests/tools/scripts/html5lib_test_fragment.xml: Removed.
* web-platform-tests/tools/scripts/id2path.js: Removed.
* web-platform-tests/tools/scripts/id2path.json: Removed.
* web-platform-tests/tools/scripts/lint.py: Removed.
* web-platform-tests/tools/scripts/manifest.js: Removed.
* web-platform-tests/tools/scripts/manifest.py: Removed.
* web-platform-tests/tools/scripts/package.json: Removed.
* web-platform-tests/tools/scripts/toc.js: Removed.
* web-platform-tests/tools/scripts/update-directory-structure.js: Removed.
* web-platform-tests/tools/scripts/update_html5lib_tests.py: Removed.
* web-platform-tests/tools/scripts/w3c-import.log: Removed.
* web-platform-tests/tools/sslutils/__init__.py: Removed.
* web-platform-tests/tools/sslutils/base.py: Removed.
* web-platform-tests/tools/sslutils/openssl.py: Removed.
* web-platform-tests/tools/sslutils/pregenerated.py: Removed.
* web-platform-tests/tools/sslutils/w3c-import.log: Removed.
* web-platform-tests/tools/w3c-import.log: Removed.
* web-platform-tests/tools/webdriver/webdriver/__init__.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/alert.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/capabilities.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/command.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/driver.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/exceptions.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/keys.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/searchcontext.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/w3c-import.log: Removed.
* web-platform-tests/tools/webdriver/webdriver/wait.py: Removed.
* web-platform-tests/tools/webdriver/webdriver/webelement.py: Removed.
* web-platform-tests/w3c-import.log:

Tools:

Disabling git submodules information conversion to json install file for web-platform-tests.
Disabling related python unit tests.
The tools submodules contain submodules and the conversion tool does not support that yet.

Updating wpt launcher script to aling it with web-platform-test main script.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
(main):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:
(TestWebPlatformTestServer.test_corrupted_subserver_files): Deleted.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_submodules_generation):

Modified Paths

Added Paths

Removed Paths

  • trunk/LayoutTests/imported/w3c/web-platform-tests/tools/

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2015-10-14 12:37:14 UTC (rev 191043)
@@ -1,3 +1,77 @@
+2015-10-14  Youenn Fablet  <youenn.fab...@crf.canon.fr>
+
+        Update web-platform-tests tools to the latest revision
+        https://bugs.webkit.org/show_bug.cgi?id=149645
+
+        Reviewed by Darin Adler.
+
+        Removed tools folder.
+        Updated ImportExpectations and TestRepositories files to match latest wpt repo revision.
+        Updated web-platform-tests using the import tool.
+
+        * resources/ImportExpectations: Skipping new test suites.
+        * resources/TestRepositories: Updating revision of default imported web-platform-tests. Disabled conversion of git submodules information.
+        * resources/web-platform-tests-modules.json: Updated by hand the modules description to align with wpt repo.
+        * web-platform-tests/.gitignore: Marking tools folder as ignored.
+        * web-platform-tests/README.md:
+        * web-platform-tests/common/w3c-import.log:
+        * web-platform-tests/config.default.json:
+        * web-platform-tests/domparsing/w3c-import.log:
+        * web-platform-tests/lint: Added.
+        * web-platform-tests/lint.whitelist: Renamed from LayoutTests/imported/w3c/web-platform-tests/tools/scripts/lint.whitelist.
+        * web-platform-tests/manifest: Added.
+        * web-platform-tests/serve: Added.
+        * web-platform-tests/serve.py:
+        (main):
+        * web-platform-tests/tools/__init__.py: Removed.
+        * web-platform-tests/tools/runner/css/bootstrap-theme.min.css: Removed.
+        * web-platform-tests/tools/runner/css/bootstrap.min.css: Removed.
+        * web-platform-tests/tools/runner/css/w3c-import.log: Removed.
+        * web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.eot: Removed.
+        * web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.svg: Removed.
+        * web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.ttf: Removed.
+        * web-platform-tests/tools/runner/fonts/glyphicons-halflings-regular.woff: Removed.
+        * web-platform-tests/tools/runner/fonts/w3c-import.log: Removed.
+        * web-platform-tests/tools/runner/logo.svg: Removed.
+        * web-platform-tests/tools/runner/report.css: Removed.
+        * web-platform-tests/tools/runner/report.py: Removed.
+        * web-platform-tests/tools/runner/runner.css: Removed.
+        * web-platform-tests/tools/runner/runner.js: Removed.
+        * web-platform-tests/tools/runner/update_manifest.py: Removed.
+        * web-platform-tests/tools/runner/w3c-import.log: Removed.
+        * web-platform-tests/tools/scripts/__init__.py: Removed.
+        * web-platform-tests/tools/scripts/_env.py: Removed.
+        * web-platform-tests/tools/scripts/html5lib_test.xml: Removed.
+        * web-platform-tests/tools/scripts/html5lib_test_fragment.xml: Removed.
+        * web-platform-tests/tools/scripts/id2path.js: Removed.
+        * web-platform-tests/tools/scripts/id2path.json: Removed.
+        * web-platform-tests/tools/scripts/lint.py: Removed.
+        * web-platform-tests/tools/scripts/manifest.js: Removed.
+        * web-platform-tests/tools/scripts/manifest.py: Removed.
+        * web-platform-tests/tools/scripts/package.json: Removed.
+        * web-platform-tests/tools/scripts/toc.js: Removed.
+        * web-platform-tests/tools/scripts/update-directory-structure.js: Removed.
+        * web-platform-tests/tools/scripts/update_html5lib_tests.py: Removed.
+        * web-platform-tests/tools/scripts/w3c-import.log: Removed.
+        * web-platform-tests/tools/sslutils/__init__.py: Removed.
+        * web-platform-tests/tools/sslutils/base.py: Removed.
+        * web-platform-tests/tools/sslutils/openssl.py: Removed.
+        * web-platform-tests/tools/sslutils/pregenerated.py: Removed.
+        * web-platform-tests/tools/sslutils/w3c-import.log: Removed.
+        * web-platform-tests/tools/w3c-import.log: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/__init__.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/alert.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/capabilities.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/command.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/driver.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/exceptions.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/keys.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/searchcontext.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/w3c-import.log: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/wait.py: Removed.
+        * web-platform-tests/tools/webdriver/webdriver/webelement.py: Removed.
+        * web-platform-tests/w3c-import.log:
+
 2015-10-07  Keith Rollin  <krol...@apple.com>
 
         script.text shouldn't include text from non-direct children of the script element

Modified: trunk/LayoutTests/imported/w3c/resources/ImportExpectations (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/resources/ImportExpectations	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/resources/ImportExpectations	2015-10-14 12:37:14 UTC (rev 191043)
@@ -62,9 +62,11 @@
 web-platform-tests/dom [ Skip ]
 #web-platform-tests/domparsing [ Pass ]
 web-platform-tests/domxpath [ Skip ]
+web-platform-tests/editing [ Skip ]
 web-platform-tests/encoding [ Skip ]
 web-platform-tests/eventsource [ Skip ]
 web-platform-tests/ext-xhtml-pubid [ Skip ]
+web-platform-tests/fetch [ Skip ]
 web-platform-tests/geolocation-API [ Skip ]
 web-platform-tests/gamepad [ Skip ]
 web-platform-tests/hr-time [ Skip ]
@@ -73,11 +75,13 @@
 web-platform-tests/html-longdesc [ Skip ]
 web-platform-tests/html-media-capture [ Skip ]
 web-platform-tests/http [ Skip ]
+web-platform-tests/infrastructure [ Skip ]
 web-platform-tests/js [ Skip ]
 web-platform-tests/media [ Skip ]
 web-platform-tests/media-source [ Skip ]
 web-platform-tests/mediacapture-streams [ Skip ]
 web-platform-tests/microdata [ Skip ]
+web-platform-tests/mixed-content [ Skip ]
 web-platform-tests/navigation-timing [ Skip ]
 web-platform-tests/notifications [ Skip ]
 web-platform-tests/old-tests [ Skip ]
@@ -88,14 +92,19 @@
 web-platform-tests/progress-events [ Skip ]
 web-platform-tests/proximity [ Skip ]
 web-platform-tests/quirks-mode [ Skip ]
+web-platform-tests/referrer-policy [ Skip ]
 web-platform-tests/resource-timing [ Skip ]
+web-platform-tests/screen-orientation [ Skip ]
+web-platform-tests/selection [ Skip ]
 web-platform-tests/selectors [ Skip ]
 web-platform-tests/selectors-api [ Skip ]
 web-platform-tests/service-workers [ Skip ]
 web-platform-tests/shadow-dom [ Skip ]
 web-platform-tests/subresource-integrity [ Skip ]
+web-platform-tests/svg [ Skip ]
 web-platform-tests/touch-events [ Skip ]
 web-platform-tests/typedarrays [ Skip ]
+web-platform-tests/uievents [ Skip ]
 web-platform-tests/url [ Skip ]
 web-platform-tests/user-timing [ Skip ]
 web-platform-tests/vibration [ Skip ]

Modified: trunk/LayoutTests/imported/w3c/resources/TestRepositories (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/resources/TestRepositories	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/resources/TestRepositories	2015-10-14 12:37:14 UTC (rev 191043)
@@ -15,7 +15,7 @@
     {
         "name": "web-platform-tests",
         "url": "https://github.com/w3c/web-platform-tests.git", 
-        "revision": "990793d",
+        "revision": "dd553279c3",
         "paths_to_skip": [
             "conformance-checkers",
             "docs",
@@ -30,6 +30,6 @@
             "config.default.json",
             "serve.py"
         ],
-        "import_options": ["generate_git_submodules_description"]
+        "import_options": []
     }
 ]

Modified: trunk/LayoutTests/imported/w3c/resources/web-platform-tests-modules.json (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/resources/web-platform-tests-modules.json	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/resources/web-platform-tests-modules.json	2015-10-14 12:37:14 UTC (rev 191043)
@@ -8,12 +8,28 @@
         "url_subpath": "testharness.js-2a1da264f6718db04c3925a9956b635426827aef"
     }, 
     {
-        "name": "wptserve", 
+        "name": "webidl2",
         "path": [
+            "resources"
+        ],
+        "url": "https://github.com/darobin/webidl2.js/archive/997fb214e02980ef4c27137553857ae6da533590.tar.gz",
+        "url_subpath": "webidl2.js-997fb214e02980ef4c27137553857ae6da533590"
+    },
+    {
+        "name": "tools", 
+        "path": [
+            "."
+        ], 
+        "url": "https://github.com/w3c/wpt-tools/archive/92f14770d10d44027a1c27b72958578ddc381ce3.tar.gz", 
+        "url_subpath": "wpt-tools-92f14770d10d44027a1c27b72958578ddc381ce3"
+    },
+    {
+        "name": "html5lib", 
+        "path": [
             "tools"
         ], 
-        "url": "https://github.com/w3c/wptserve/archive/91e764ffa0f587090341a26af457dfdc6762eb0d.tar.gz", 
-        "url_subpath": "wptserve-91e764ffa0f587090341a26af457dfdc6762eb0d"
+        "url": "https://github.com/html5lib/html5lib-python/archive/7cce65bbaa78411f98b8b37eeefc9db03c580097.tar.gz", 
+        "url_subpath": "html5lib-python-7cce65bbaa78411f98b8b37eeefc9db03c580097"
     }, 
     {
         "name": "pywebsocket", 
@@ -24,14 +40,6 @@
         "url_subpath": "pywebsocket-8c285d9015121e8c1c40be852439fc03b4a18112"
     }, 
     {
-        "name": "html5lib", 
-        "path": [
-            "tools"
-        ], 
-        "url": "https://github.com/html5lib/html5lib-python/archive/7cce65bbaa78411f98b8b37eeefc9db03c580097.tar.gz", 
-        "url_subpath": "html5lib-python-7cce65bbaa78411f98b8b37eeefc9db03c580097"
-    }, 
-    {
         "name": "six", 
         "path": [
             "tools"
@@ -40,11 +48,11 @@
         "url_subpath": "six-3b6173c833d217ab0186c355804f5925cbcfca47"
     },
     {
-        "name": "webidl2",
+        "name": "wptserve", 
         "path": [
-            "resources"
-        ],
-        "url": "https://github.com/darobin/webidl2.js/archive/997fb214e02980ef4c27137553857ae6da533590.tar.gz",
-        "url_subpath": "webidl2.js-997fb214e02980ef4c27137553857ae6da533590"
+            "tools"
+        ], 
+        "url": "https://github.com/w3c/wptserve/archive/b6b082fb70c592c6164c76aa167ae4dc284ebb69.tar.gz", 
+        "url_subpath": "wptserve-b6b082fb70c592c6164c76aa167ae4dc284ebb69"
     }
 ]

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/.gitignore (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/.gitignore	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/.gitignore	2015-10-14 12:37:14 UTC (rev 191043)
@@ -3,13 +3,5 @@
 
 /resources/
 
-/tools/.html5lib.url
-/tools/.pywebsocket.url
-/tools/.six.url
-/tools/.wptserve.url
-
-/tools/html5lib/
-/tools/pywebsocket/
-/tools/six/
-/tools/wptserve/
-
+/.tools.url
+/tools/

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/README.md (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/README.md	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/README.md	2015-10-14 12:37:14 UTC (rev 191043)
@@ -1,19 +1,28 @@
 The Web Platform Tests Project [![IRC chat](https://goo.gl/6nCIks)](http://irc.w3.org/?channels=testing)
 ==============================
 
-These are test suites for 60+ Web-platform specifications, along
-with test-infrastructure code for running the tests.
+The Web Platform Tests Project is a W3C-coordinated attempt to build a
+cross-browser testsuite for the Web-platform stack. Writing tests in a
+way that allows them to be run in all browsers gives browser projects
+confidence that they are shipping software that is compatible with other
+implementations, and that later implementations will be compatible with
+their implementations. This in turn gives Web authors/developers
+confidence that they can actually rely on the Web platform to deliver on
+the promise of working across browsers and devices without needing extra
+layers of abstraction to paper over the gaps left by specification
+editors and implementors.
 
 Running the Tests
 =================
 
 The tests are designed to be run from your local computer. The test
 environment requires Python 2.7+ (but not Python 3.x). You will also
-need a copy of OpenSSL. For users on Windows this is available from
-[the openssl website](https://www.openssl.org/related/binaries.html).
+need a copy of OpenSSL. Users on Windows should read the
+[Windows Notes](#windows-notes) section below.
 
 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 following entries are required:
+[`hosts` file](http://en.wikipedia.org/wiki/Hosts_%28file%29%23Location_in_the_file_system). The
+following entries are required:
 
 ```
 127.0.0.1	web-platform.test
@@ -34,7 +43,7 @@
 The test environment can then be started using
 
 ```
-python serve.py
+./serve
 ```
 
 This will start HTTP servers on two ports and a websockets server on
@@ -62,6 +71,26 @@
 "ssl": {"openssl": {"binary": "/path/to/openssl"}}
 ```
 
+<span id="windows-notes">Windows Notes</span>
+=============================================
+
+Running wptserve with SSL enabled on Windows typically requires
+installing an OpenSSL distribution.
+[Shining Light](http://slproweb.com/products/Win32OpenSSL.html)
+provide a convenient installer that is known to work, but requires a
+little extra setup.
+
+After installation ensure that the path to OpenSSL is on your `%Path%`
+environment variable.
+
+Then set the path to the default OpenSSL configuration file (usually
+something like `C:\OpenSSL-Win32\bin\openssl.cfg` in the server
+configuration. To do this copy `config.default.json` in the
+web-platform-tests root to `config.json`. Then edit the JSON so that
+the key `ssl/openssl/base_conf_path` has a value that is the path to
+the OpenSSL config file.
+
+
 Test Runner
 ===========
 
@@ -70,41 +99,16 @@
 testharness.js tests automatically but requires manual work for
 reftests and manual tests.
 
-In order to use the runner, it is first necessary to generate a test
-manifest. This must be called `MANIFEST.json` and placed in the
-web-platform-tests root.
+The runner can be found at `/tools/runner/index.html` on the local
+server i.e.
 
-You must do this step to use the test runner, even if you are not
-creating a new test suite.
-
-To generate this file, from a command prompt at the root
-directory of the repo, run:
-
 ```
-python tools/scripts/manifest.py
-```
-This `tools/scripts/manifest.py` needs python `html5lib` package.
-If you have not installed it yet, run:
-```
-pip install html5lib
-```
-
-On Mac OS X, python is installed with Xcode, but pip is not. Try
-```
-sudo easy_install pip
-```
-if pip is not already on your system.
-
-
-Running the tests requires that the test environment be activated as
-described above. The runner can be found at `/tools/runner/index.html`
-on the local server i.e.
-
-```
 http://web-platform.test:8000/tools/runner/index.html
 ```
 
-in the default configuration.
+in the default configuration. The first time you use this it has to
+generate a manifest of all tests. This may take some time, so please
+be patient.
 
 Publication
 ===========
@@ -142,18 +146,10 @@
 Branches
 ========
 
-In the vast majority of cases the **only** branch that you should need
-to care about is `master`.
+In the vast majority of cases the **only** upstream branch that you
+should need to care about is `master`. If you see other branches in
+the repository, you can generally safely ignore them.
 
-There is another branch called `CR`. This is a strict subset of
-`master` that is limited to features that are found in the Candidate
-Recommendation version of the relevant specifications.
-
-If you see other branches in the repository, you can generally safely
-ignore them. Please note that branches prefixed with `temp/` are
-temporary branches and **can** get deleted at some point. So don't
-base any work off them unless you want to see your work destroyed.
-
 Contributing
 ============
 
@@ -167,22 +163,80 @@
 
 The way to contribute is just as usual:
 
-* fork this repository (and make sure you're still relatively in sync
-  with it if you forked a while ago);
-* create a branch for your changes:
-  `git checkout -b your-name/topic`;
-* make your changes;
-* push that to your repo;
-* and send in a pull request based on the above.
+* Fork this repository (and make sure you're still relatively in sync
+  with it if you forked a while ago).
+* Create a branch for your changes:
+  `git checkout -b topic`.
+* Make your changes.
+* Run the lint script described below.
+* Commit locally and push that to your repo.
+* Send in a pull request based on the above.
 
-Please make your pull requests either to `master` or to a feature
-branch (but not to `CR`).
+Lint tool
+---------
 
+We have a lint tool for catching common mistakes in test files. You
+can run it manually by starting the `lint` executable from the root of
+your local web-platform-tests working directory like this:
+
+```
+./lint
+```
+
+The lint tool is also run automatically for every submitted pull
+request, and reviewers will not merge branches with tests that have
+lint errors, so you must fix any errors the lint tool reports. For
+details on doing that, see the [lint-tool documentation][lint-tool].
+
+But in the unusual case of error reports for things essential to a
+certain test or that for other exceptional reasons shouldn't prevent
+a merge of a test, update and commit the `lint.whitelist` file in the
+web-platform-tests root directory to suppress the error reports. For
+details on doing that, see the [lint-tool documentation][lint-tool].
+
+[lint-tool]: https://github.com/w3c/web-platform-tests/blob/master/docs/lint-tool.md
+
+Adding command-line scripts ("tools" subdirs)
+---------------------------------------------
+
+Sometimes you may want to add a script to the repository that's meant
+to be used from the command line, not from a browser (e.g., a script
+for generating test files). If you want to ensure (e.g., for security
+reasons) that such scripts won't be handled by the HTTP server, but
+will instead only be usable from the command line, then place them in
+either:
+
+* the `tools` subdir at the root of the repository, or
+
+* the `tools` subdir at the root of any top-level directory in the
+  repository which contains the tests the script is meant to be used
+  with
+
+Any files in those `tools` directories won't be handled by the HTTP
+server; instead the server will return a 404 if a user navigates to
+the URL for a file within them.
+
+If you want to add a script for use with a particular set of tests but
+there isn't yet any `tools` subdir at the root of a top-level
+directory in the repository containing those tests, you can create a
+`tools` subdir at the root of that top-level directory and place your
+scripts there.
+
+For example, if you wanted to add a script for use with tests in the
+`notifications` directory, create the `notifications/tools` subdir and
+put your script there.
+
+Test Review
+===========
+
 We can sometimes take a little while to go through pull requests
 because we have to go through all the tests and ensure that they match
 the specification correctly. But we look at all of them, and take
 everything that we can.
 
+Getting Involved
+================
+
 If you wish to contribute actively, you're very welcome to join the
 public-test-in...@w3.org mailing list (low traffic) by
 [signing up to our mailing list](mailto:public-test-infra-requ...@w3.org?subject=subscribe).
@@ -196,30 +250,8 @@
 [ircarchive]: http://krijnhoetmer.nl/irc-logs/testing/
 [mailarchive]: http://lists.w3.org/Archives/Public/public-test-infra/
 
-Adding command-line scripts ("tools" subdirs)
-----------------------------------------------------
-Sometimes you may want to add a script to the repository that's meant to be used from the
-command line, not from a browser (e.g., a script for generating test files). If you want to
-ensure (e.g., or security reasons) that such scripts won't be handled by the HTTP server,
-but will instead only be usable from the command line, then place them in either:
-
-* the `tools` subdir at the root of the repository, or
-* the `tools` subdir at the root of any top-level directory in the repository which
-  contains the tests the script is meant to be used with
-
-Any files in those `tools` directories won't be handled by the HTTP server; instead the
-server will return a 404 if a user navigates to the URL for a file within them.
-
-If you want to add a script for use with a particular set of tests but there isn't yet any
-`tools` subdir at the root of a top-level directory in the repository containing those
-tests, you can create a `tools` subdir at the root of that top-level directory and place
-your scripts there.
-
-For example, if you wanted to add a script for use with tests in the `notifications`
-directory, create the `notifications/tools` subdir and put your script there.
-
 Documentation
--------------
+=============
 
 * [How to write and review tests](http://testthewebforward.org/docs/)
 * [Documentation for the wptserve server](http://wptserve.readthedocs.org/en/latest/)

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/common/w3c-import.log	2015-10-14 12:37:14 UTC (rev 191043)
@@ -21,7 +21,6 @@
 /LayoutTests/imported/w3c/web-platform-tests/common/canvas-tests.css
 /LayoutTests/imported/w3c/web-platform-tests/common/canvas-tests.js
 /LayoutTests/imported/w3c/web-platform-tests/common/css-red.txt
-/LayoutTests/imported/w3c/web-platform-tests/common/failing-test.html
 /LayoutTests/imported/w3c/web-platform-tests/common/large.py
 /LayoutTests/imported/w3c/web-platform-tests/common/media.js
 /LayoutTests/imported/w3c/web-platform-tests/common/redirect.py

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/config.default.json (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/config.default.json	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/config.default.json	2015-10-14 12:37:14 UTC (rev 191043)
@@ -1,8 +1,11 @@
 {"host": "web-platform.test",
+ "doc_root": null,
+ "ws_doc_root": null,
  "external_host": null,
  "ports":{"http":[8000, "auto"],
           "https":[8443],
-          "ws":["auto"]},
+          "ws":["auto"],
+          "wss":["auto"]},
  "check_subdomains": true,
  "log_level":"debug",
  "bind_hostname": true,
@@ -11,7 +14,8 @@
          "openssl": {
              "openssl_binary": "openssl",
              "base_path": "_certs",
-             "force_regenerate": false
+             "force_regenerate": false,
+             "base_conf_path": null
          },
          "pregenerated": {
              "host_key_path": null,

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/w3c-import.log (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/w3c-import.log	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/domparsing/w3c-import.log	2015-10-14 12:37:14 UTC (rev 191043)
@@ -9,13 +9,13 @@
 Do NOT modify or remove this file
 
 ------------------------------------------------------------------------
-Last Import: 2015-01-27 10:26
-------------------------------------------------------------------------
 Properties requiring vendor prefixes:
 None
 Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html.html
+/LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-xml.html
+/LayoutTests/imported/w3c/web-platform-tests/domparsing/XMLSerializer-serializeToString.html
 /LayoutTests/imported/w3c/web-platform-tests/domparsing/insert-adjacent.html
-/LayoutTests/imported/w3c/web-platform-tests/domparsing/DOMParser-parseFromString-html.html

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/lint (0 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/lint	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/lint	2015-10-14 12:37:14 UTC (rev 191043)
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+import sys
+
+from tools.lint import lint
+
+sys.exit(0 if lint.main() == 0 else 1)

Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/lint.whitelist (from rev 191042, trunk/LayoutTests/imported/w3c/web-platform-tests/tools/scripts/lint.whitelist) (0 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/lint.whitelist	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/lint.whitelist	2015-10-14 12:37:14 UTC (rev 191043)
@@ -0,0 +1,110 @@
+# File containing whiteslist for lint errors
+# Format is:
+# ERROR TYPE:file/name/pattern[:line number]
+# e.g.
+# TRAILING WHITESPACE:example/file.html:128
+# to allow trailing whitespace on example/file.html line 128
+
+## Whitespace rules that we can't enforce yet ##
+
+CR AT EOL: svg/import/*
+
+INDENT TABS: .gitmodules
+INDENT TABS: app-uri/*
+INDENT TABS: conformance-checkers/*
+INDENT TABS: content-security-policy/*
+INDENT TABS: custom-elements/*
+INDENT TABS: DOMEvents/*
+INDENT TABS: html/editing/dnd/*
+INDENT TABS: old-tests/*
+INDENT TABS: pointerlock/*
+INDENT TABS: shadow-dom/*
+INDENT TABS: svg/import/*
+INDENT TABS: tools/*
+INDENT TABS: touch-events/*
+INDENT TABS: web-animations/*
+INDENT TABS: webaudio/*
+INDENT TABS: webdriver/*
+INDENT TABS: webvtt/*
+INDENT TABS: XMLHttpRequest/*
+
+TRAILING WHITESPACE: app-uri/*
+TRAILING WHITESPACE: battery-status/*
+TRAILING WHITESPACE: conformance-checkers/*
+TRAILING WHITESPACE: content-security-policy/*
+TRAILING WHITESPACE: custom-elements/*
+TRAILING WHITESPACE: DOMEvents/*
+TRAILING WHITESPACE: html-longdesc/*
+TRAILING WHITESPACE: microdata/*
+TRAILING WHITESPACE: old-tests/*
+TRAILING WHITESPACE: pointerevents/*
+TRAILING WHITESPACE: progress-events/*
+TRAILING WHITESPACE: shadow-dom/*
+TRAILING WHITESPACE: svg/import/*
+TRAILING WHITESPACE: tools/*
+TRAILING WHITESPACE: webaudio/*
+TRAILING WHITESPACE: webdriver/*
+TRAILING WHITESPACE: WebIDL/*
+TRAILING WHITESPACE: webvtt/*
+TRAILING WHITESPACE: XMLHttpRequest/*
+
+## File types that should never be checked ##
+
+*:*.pdf
+*:*.jpg
+*:*.png
+*:*.gif
+*:*.pdf
+*:*.wav
+*:*.mp3
+*:*.m4a
+*:*.oga
+*:*.ogv
+*:*.webm
+*:*.mp4
+*:*.m4v
+*:*.ttf
+*:*.woff
+*:*.eot
+*:*.sfd
+*:*.swf
+
+## Documentation ##
+
+W3C-TEST.ORG:README.md
+W3C-TEST.ORG:*/README.md
+W3C-TEST.ORG:docs/*
+
+## Helper scripts ##
+
+W3C-TEST.ORG:tools/*
+PRINT STATEMENT:tools/*
+W3C-TEST.ORG:*/tools/*
+PRINT STATEMENT:*/tools/*
+
+### Test exclusions ##
+
+CR AT EOL:WebIDL/valid/idl/documentation-dos.widl
+CR AT EOL:cors/resources/cors-headers.asis
+CR AT EOL:html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html
+INDENT TABS:html/semantics/embedded-content/the-canvas-element/size.attributes.parse.whitespace.html
+CR AT EOL:webvtt/webvtt-file-format-parsing/webvtt-file-parsing/support/newlines.vtt
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.svg
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.xhtml
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/minimal_html.svg
+PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/minimal_html.xhtml
+
+# These have undefined entities; should probably find a way to define them
+PARSE-FAILED:ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents/xhtml-pubid-1.xhtml
+PARSE-FAILED:ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents/xhtml-pubid-2.xhtml
+PARSE-FAILED:ext-xhtml-pubid/the-xhtml-syntax/parsing-xhtml-documents/xhtml-pubid-3.xhtml
+
+# Test generation files containing print statements
+PRINT STATEMENT:dom/nodes/Document-createElement-namespace-tests/generate.py
+
+# Should probably be fixed.
+W3C-TEST.ORG:subresource-integrity/refresh-header.js.headers
+
+# Lint doesn't know about sub.svg I guess
+PARSE-FAILED:content-security-policy/svg/including.sub.svg
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/manifest (0 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/manifest	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/manifest	2015-10-14 12:37:14 UTC (rev 191043)
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+import os
+import sys
+
+from tools.manifest import update
+
+update.main(default_tests_root=
+            os.path.abspath(os.path.dirname(__file__)))

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/serve (0 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/serve	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/serve	2015-10-14 12:37:14 UTC (rev 191043)
@@ -0,0 +1,5 @@
+#!/usr/bin/env python
+import serve
+
+if __name__ == "__main__":
+    serve.main()

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/serve.py (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/serve.py	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/serve.py	2015-10-14 12:37:14 UTC (rev 191043)
@@ -1,459 +1,4 @@
- # -*- coding: utf-8 -*-
-import argparse
-import json
-import os
-import signal
-import socket
-import sys
-import threading
-import time
-import traceback
-import urllib2
-import uuid
-from collections import defaultdict
-from multiprocessing import Process, Event
+from tools.serve import serve
 
-from tools.scripts import _env
-repo_root = _env.repo_root
-from wptserve import server as wptserve, handlers
-from wptserve.router import any_method
-from wptserve.logger import set_logger
-
-from mod_pywebsocket import standalone as pywebsocket
-
-sys.path.insert(1, os.path.join(repo_root, "tools"))
-import sslutils
-
-
-@handlers.handler
-def workers_handler(request, response):
-    worker_path = request.url_parts.path.replace(".worker", ".worker.js")
-    return """
-<!doctype html>
-<meta charset=utf-8>
-<script src=""
-<script src=""
-<div id=log></div>
-<script>
-fetch_tests_from_worker(new Worker("%s"));
-</script>
-""" % (worker_path,)
-
-
-routes = [("GET", "/tools/runner/*", handlers.file_handler),
-          ("POST", "/tools/runner/update_manifest.py", handlers.python_script_handler),
-          (any_method, "/_certs/*", handlers.ErrorHandler(404)),
-          (any_method, "/tools/*", handlers.ErrorHandler(404)),
-          (any_method, "{spec}/tools/*", handlers.ErrorHandler(404)),
-          (any_method, "/serve.py", handlers.ErrorHandler(404)),
-          (any_method, "*.py", handlers.python_script_handler),
-          ("GET", "*.asis", handlers.as_is_handler),
-          ("GET", "*.worker", workers_handler),
-          ("GET", "*", handlers.file_handler),
-          ]
-
-rewrites = [("GET", "/resources/WebIDLParser.js", "/resources/webidl2/lib/webidl2.js")]
-
-subdomains = [u"www",
-              u"www1",
-              u"www2",
-              u"天気の良い日",
-              u"élève"]
-
-def setup_logger(level):
-    import logging
-    global logger
-    logger = logging.getLogger("web-platform-tests")
-    logging.basicConfig(level=getattr(logging, level.upper()))
-    set_logger(logger)
-
-
-def open_socket(port):
-    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-    if port != 0:
-        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-    sock.bind(('127.0.0.1', port))
-    sock.listen(5)
-    return sock
-
-
-def get_port():
-    free_socket = open_socket(0)
-    port = free_socket.getsockname()[1]
-    logger.debug("Going to use port %s" % port)
-    free_socket.close()
-    return port
-
-
-class ServerProc(object):
-    def __init__(self):
-        self.proc = None
-        self.daemon = None
-        self.stop = Event()
-
-    def start(self, init_func, host, port, paths, bind_hostname, external_config, ssl_config,
-              **kwargs):
-        self.proc = Process(target=self.create_daemon,
-                            args=(init_func, host, port, paths, bind_hostname,
-                                  external_config, ssl_config))
-        self.proc.daemon = True
-        self.proc.start()
-
-    def create_daemon(self, init_func, host, port, paths, bind_hostname, external_config, ssl_config,
-                      **kwargs):
-        try:
-            self.daemon = init_func(host, port, paths, bind_hostname, external_config,
-                                    ssl_config, **kwargs)
-        except socket.error:
-            print >> sys.stderr, "Socket error on port %s" % port
-            raise
-        except:
-            print >> sys.stderr, traceback.format_exc()
-            raise
-
-        if self.daemon:
-            try:
-                self.daemon.start(block=False)
-                try:
-                    self.stop.wait()
-                except KeyboardInterrupt:
-                    pass
-            except:
-                print >> sys.stderr, traceback.format_exc()
-                raise
-
-    def wait(self):
-        self.stop.set()
-        self.proc.join()
-
-    def kill(self):
-        self.stop.set()
-        self.proc.terminate()
-        self.proc.join()
-
-    def is_alive(self):
-        return self.proc.is_alive()
-
-
-def check_subdomains(host, paths, bind_hostname, ssl_config):
-    port = get_port()
-    subdomains = get_subdomains(host)
-
-    wrapper = ServerProc()
-    wrapper.start(start_http_server, host, port, paths, bind_hostname, None, ssl_config)
-
-    connected = False
-    for i in range(10):
-        try:
-            urllib2.urlopen("http://%s:%d/" % (host, port))
-            connected = True
-            break
-        except urllib2.URLError:
-            time.sleep(1)
-
-    if not connected:
-        logger.critical("Failed to connect to test server on http://%s:%s You may need to edit /etc/hosts or similar" % (host, port))
-        sys.exit(1)
-
-    for subdomain, (punycode, host) in subdomains.iteritems():
-        domain = "%s.%s" % (punycode, host)
-        try:
-            urllib2.urlopen("http://%s:%d/" % (domain, port))
-        except Exception as e:
-            logger.critical("Failed probing domain %s. You may need to edit /etc/hosts or similar." % domain)
-            sys.exit(1)
-
-    wrapper.wait()
-
-
-def get_subdomains(host):
-    #This assumes that the tld is ascii-only or already in punycode
-    return {subdomain: (subdomain.encode("idna"), host)
-            for subdomain in subdomains}
-
-
-def start_servers(host, ports, paths, bind_hostname, external_config, ssl_config, **kwargs):
-    servers = defaultdict(list)
-    for scheme, ports in ports.iteritems():
-        assert len(ports) == {"http":2}.get(scheme, 1)
-
-        for port  in ports:
-            if port is None:
-                continue
-            init_func = {"http":start_http_server,
-                         "https":start_https_server,
-                         "ws":start_ws_server,
-                         "wss":start_wss_server}[scheme]
-
-            server_proc = ServerProc()
-            server_proc.start(init_func, host, port, paths, bind_hostname,
-                              external_config, ssl_config, **kwargs)
-            servers[scheme].append((port, server_proc))
-
-    return servers
-
-
-def start_http_server(host, port, paths, bind_hostname, external_config, ssl_config,
-                      **kwargs):
-    return wptserve.WebTestHttpd(host=host,
-                                 port=port,
-                                 doc_root=paths["doc_root"],
-                                 routes=routes,
-                                 rewrites=rewrites,
-                                 bind_hostname=bind_hostname,
-                                 config=external_config,
-                                 use_ssl=False,
-                                 key_file=None,
-                                 certificate=None,
-                                 latency=kwargs.get("latency"))
-
-
-def start_https_server(host, port, paths, bind_hostname, external_config, ssl_config,
-                       **kwargs):
-    return wptserve.WebTestHttpd(host=host,
-                                 port=port,
-                                 doc_root=paths["doc_root"],
-                                 routes=routes,
-                                 rewrites=rewrites,
-                                 bind_hostname=bind_hostname,
-                                 config=external_config,
-                                 use_ssl=True,
-                                 key_file=ssl_config["key_path"],
-                                 certificate=ssl_config["cert_path"],
-                                 encrypt_after_connect=ssl_config["encrypt_after_connect"],
-                                 latency=kwargs.get("latency"))
-
-
-class WebSocketDaemon(object):
-    def __init__(self, host, port, doc_root, handlers_root, log_level, bind_hostname,
-                 ssl_config):
-        self.host = host
-        cmd_args = ["-p", port,
-                    "-d", doc_root,
-                    "-w", handlers_root,
-                    "--log-level", log_level]
-        if (bind_hostname):
-            cmd_args = ["-H", host] + cmd_args
-        opts, args = pywebsocket._parse_args_and_config(cmd_args)
-        opts.cgi_directories = []
-        opts.is_executable_method = None
-        self.server = pywebsocket.WebSocketServer(opts)
-        ports = [item[0].getsockname()[1] for item in self.server._sockets]
-        assert all(item == ports[0] for item in ports)
-        self.port = ports[0]
-        self.started = False
-        self.server_thread = None
-
-    def start(self, block=False):
-        self.started = True
-        if block:
-            self.server.serve_forever()
-        else:
-            self.server_thread = threading.Thread(target=self.server.serve_forever)
-            self.server_thread.setDaemon(True)  # don't hang on exit
-            self.server_thread.start()
-
-    def stop(self):
-        """
-        Stops the server.
-
-        If the server is not running, this method has no effect.
-        """
-        if self.started:
-            try:
-                self.server.shutdown()
-                self.server.server_close()
-                self.server_thread.join()
-                self.server_thread = None
-            except AttributeError:
-                pass
-            self.started = False
-        self.server = None
-
-
-def start_ws_server(host, port, paths, bind_hostname, external_config, ssl_config,
-                    **kwargs):
-    return WebSocketDaemon(host,
-                           str(port),
-                           repo_root,
-                           paths["ws_doc_root"],
-                           "debug",
-                           bind_hostname,
-                           ssl_config)
-
-
-def start_wss_server(host, port, path, bind_hostname, external_config, ssl_config,
-                     **kwargs):
-    return
-
-
-def get_ports(config, ssl_enabled):
-    rv = defaultdict(list)
-    for scheme, ports in config["ports"].iteritems():
-        for i, port in enumerate(ports):
-            if scheme in ["http", "https"] and not ssl_enabled:
-                port = None
-            if port == "auto":
-                port = get_port()
-            else:
-                port = port
-            rv[scheme].append(port)
-    return rv
-
-
-
-def normalise_config(config, ports):
-    host = config["external_host"] if config["external_host"] else config["host"]
-    domains = get_subdomains(host)
-    ports_ = {}
-    for scheme, ports_used in ports.iteritems():
-        ports_[scheme] = ports_used
-
-    for key, value in domains.iteritems():
-        domains[key] = ".".join(value)
-
-    domains[""] = host
-
-    ports_ = {}
-    for scheme, ports_used in ports.iteritems():
-        ports_[scheme] = ports_used
-
-    return {"host": host,
-            "domains": domains,
-            "ports": ports_}
-
-
-def get_ssl_config(config, external_domains, ssl_environment):
-    key_path, cert_path = ssl_environment.host_cert_path(external_domains)
-    return {"key_path": key_path,
-            "cert_path": cert_path,
-            "encrypt_after_connect": config["ssl"]["encrypt_after_connect"]}
-
-
-def start(config, ssl_environment, **kwargs):
-    host = config["host"]
-    domains = get_subdomains(host)
-    ports = get_ports(config, ssl_environment)
-    bind_hostname = config["bind_hostname"]
-
-    paths = {"doc_root": config["doc_root"],
-             "ws_doc_root": config["ws_doc_root"]}
-
-    external_config = normalise_config(config, ports)
-
-    ssl_config = get_ssl_config(config, external_config["domains"].values(), ssl_environment)
-
-    if config["check_subdomains"]:
-        check_subdomains(host, paths, bind_hostname, ssl_config)
-
-    servers = start_servers(host, ports, paths, bind_hostname, external_config, ssl_config,
-                            **kwargs)
-
-    return external_config, servers
-
-
-def iter_procs(servers):
-    for servers in servers.values():
-        for port, server in servers:
-            yield server.proc
-
-
-def value_set(config, key):
-    return key in config and config[key] is not None
-
-
-def set_computed_defaults(config):
-    if not value_set(config, "ws_doc_root"):
-        if value_set(config, "doc_root"):
-            root = config["doc_root"]
-        else:
-            root = repo_root
-        config["ws_doc_root"] = os.path.join(repo_root, "websockets", "handlers")
-
-    if not value_set(config, "doc_root"):
-        config["doc_root"] = repo_root
-
-
-def merge_json(base_obj, override_obj):
-    rv = {}
-    for key, value in base_obj.iteritems():
-        if key not in override_obj:
-            rv[key] = value
-        else:
-            if isinstance(value, dict):
-                rv[key] = merge_json(value, override_obj[key])
-            else:
-                rv[key] = override_obj[key]
-    return rv
-
-
-def get_ssl_environment(config):
-    implementation_type = config["ssl"]["type"]
-    cls = sslutils.environments[implementation_type]
-    try:
-        kwargs = config["ssl"][implementation_type].copy()
-    except KeyError:
-        raise ValueError("%s is not a vaid ssl type." % implementation_type)
-    return cls(logger, **kwargs)
-
-
-def load_config(default_path, override_path=None, **kwargs):
-    if os.path.exists(default_path):
-        with open(default_path) as f:
-            base_obj = json.load(f)
-    else:
-        raise ValueError("Config path %s does not exist" % default_path)
-
-    if os.path.exists(override_path):
-        with open(override_path) as f:
-            override_obj = json.load(f)
-    else:
-        override_obj = {}
-    rv = merge_json(base_obj, override_obj)
-
-    if kwargs.get("config_path"):
-        other_path = os.path.abspath(os.path.expanduser(kwargs.get("config_path")))
-        if os.path.exists(other_path):
-            base_obj = rv
-            with open(other_path) as f:
-                override_obj = json.load(f)
-            rv = merge_json(base_obj, override_obj)
-        else:
-            raise ValueError("Config path %s does not exist" % other_path)
-
-    set_computed_defaults(rv)
-    return rv
-
-
-def get_parser():
-    parser = argparse.ArgumentParser()
-    parser.add_argument("--latency", type=int,
-                        help="Artificial latency to add before sending http responses, in ms")
-    parser.add_argument("--config", action="" dest="config_path",
-                        help="Path to external config file")
-    return parser
-
-
 def main():
-    kwargs = vars(get_parser().parse_args())
-    config = load_config("config.default.json",
-                         "config.json",
-                         **kwargs)
-
-    setup_logger(config["log_level"])
-
-    ssl_env = get_ssl_environment(config)
-
-    with get_ssl_environment(config) as ssl_env:
-        config_, servers = start(config, ssl_env, **kwargs)
-
-        try:
-            while any(item.is_alive() for item in iter_procs(servers)):
-                for item in iter_procs(servers):
-                    item.join(1)
-        except KeyboardInterrupt:
-            logger.info("Shutting down")
-
-
-if __name__ == "__main__":
-    main()
+    serve.main()

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/w3c-import.log (191042 => 191043)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/w3c-import.log	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/w3c-import.log	2015-10-14 12:37:14 UTC (rev 191043)
@@ -19,5 +19,9 @@
 /LayoutTests/imported/w3c/web-platform-tests/LICENSE
 /LayoutTests/imported/w3c/web-platform-tests/README.md
 /LayoutTests/imported/w3c/web-platform-tests/config.default.json
+/LayoutTests/imported/w3c/web-platform-tests/lint
+/LayoutTests/imported/w3c/web-platform-tests/lint.whitelist
+/LayoutTests/imported/w3c/web-platform-tests/manifest
+/LayoutTests/imported/w3c/web-platform-tests/serve
 /LayoutTests/imported/w3c/web-platform-tests/serve.py
 /LayoutTests/imported/w3c/web-platform-tests/server-side.md

Modified: trunk/Tools/ChangeLog (191042 => 191043)


--- trunk/Tools/ChangeLog	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/Tools/ChangeLog	2015-10-14 12:37:14 UTC (rev 191043)
@@ -1,3 +1,23 @@
+2015-10-14  Youenn Fablet  <youenn.fab...@crf.canon.fr>
+
+        Update web-platform-tests tools to the latest revision
+        https://bugs.webkit.org/show_bug.cgi?id=149645
+
+        Reviewed by Darin Adler.
+
+        Disabling git submodules information conversion to json install file for web-platform-tests.
+        Disabling related python unit tests.
+        The tools submodules contain submodules and the conversion tool does not support that yet.
+
+        Updating wpt launcher script to aling it with web-platform-test main script.
+
+        * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
+        (main):
+        * Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py:
+        (TestWebPlatformTestServer.test_corrupted_subserver_files): Deleted.
+        * Scripts/webkitpy/w3c/test_importer_unittest.py:
+        (TestImporterTest.test_submodules_generation):
+
 2015-10-13  Alexey Proskuryakov  <a...@apple.com>
 
         More debug queue build fixing.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py (191042 => 191043)


--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py	2015-10-14 12:37:14 UTC (rev 191043)
@@ -6,13 +6,16 @@
 import logging
 import os
 import sys
+import uuid
 
 logger = logging.getLogger('web-platform-test-launcher')
 logging.basicConfig(level=logging.DEBUG)
 
 try:
     sys.path.insert(0, os.getcwd())
-    import serve as WebPlatformTestServer
+    import tools.serve.serve as WebPlatformTestServer
+    sys.path.insert(0, os.path.join(os.getcwd(), "tools", "wptserve", "wptserve"))
+    import stash
 except ImportError, e:
     logger.critical("Import of wpt serve module failed.\n"
         "Please check that the file serve.py is present in the web-platform-tests folder.\n"
@@ -26,16 +29,17 @@
     # This is a copy of serve.py main function, except for the wait step
     config = WebPlatformTestServer.load_config("config.default.json", "config.json")
     WebPlatformTestServer.setup_logger(config["log_level"])
-    ssl_env = WebPlatformTestServer.get_ssl_environment(config)
     logged_servers = []
-    with WebPlatformTestServer.get_ssl_environment(config) as ssl_env:
-        config_, started_servers = WebPlatformTestServer.start(config, ssl_env)
 
-        for protocol, servers in started_servers.items():
-            for port, process in servers:
-                logged_servers.append({"protocol": protocol, "port": port, "pid": process.proc.pid})
-                logger.info("%s, port:%d, pid:%d" % (protocol, port, process.proc.pid))
+    with stash.StashServer((config["host"], WebPlatformTestServer.get_port()), authkey=str(uuid.uuid4())):
+        with WebPlatformTestServer.get_ssl_environment(config) as ssl_env:
+            config_, started_servers = WebPlatformTestServer.start(config, ssl_env, WebPlatformTestServer.default_routes())
 
+            for protocol, servers in started_servers.items():
+                for port, process in servers:
+                    logged_servers.append({"protocol": protocol, "port": port, "pid": process.proc.pid})
+                    logger.info("%s, port:%d, pid:%d" % (protocol, port, process.proc.pid))
+
     # Write pids in a file in case abrupt shutdown is needed
     with open(argv[0], "wb") as servers_file:
         json.dump(logged_servers, servers_file)

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py (191042 => 191043)


--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server_unittest.py	2015-10-14 12:37:14 UTC (rev 191043)
@@ -47,28 +47,6 @@
         server.start()
         server.stop()
 
-    def test_import_web_platform_test_modules(self):
-        fs = FileSystem()
-        current_dir, name = fs.split(fs.realpath(__file__))
-        doc_root_dir = fs.join(current_dir, "..", "..", "..", "..", "..", "LayoutTests", "imported", "w3c", "web-platform-tests")
-        tools_dir = fs.join(doc_root_dir, "tools")
-
-        sys.path.insert(0, doc_root_dir)
-        try:
-            file, pathname, description = imp.find_module("tools")
-        except ImportError, e:
-            self.fail(e)
-        self.assertEqual(pathname, tools_dir)
-        sys.path.pop(0)
-
-        sys.path.insert(0, tools_dir)
-        try:
-            file, pathname, description = imp.find_module("scripts")
-        except ImportError, e:
-            self.fail(e)
-        self.assertEqual(pathname, fs.join(tools_dir, "scripts"))
-        sys.path.pop(0)
-
     def test_corrupted_subserver_files(self):
         host = MockHost()
         port = Port(host, "test")

Modified: trunk/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py (191042 => 191043)


--- trunk/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py	2015-10-14 10:57:49 UTC (rev 191042)
+++ trunk/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py	2015-10-14 12:37:14 UTC (rev 191043)
@@ -135,8 +135,9 @@
         fs = self.import_downloaded_tests(['--no-fetch', '--import-all', '-d', 'w3c'], FAKE_FILES)
 
         self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/resources/csswg-tests-modules.json'))
-        self.assertTrue(fs.exists('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json'))
-        self.assertTrue('https://github.com/w3c/testharness.js/archive/db4d391a69877d4a1eaaf51d1725c99a5b8ed84.tar.gz' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json'))
+        # Disabling git modules json tests since wpt uses a module of modules for its tools, which are not supported yet by the import script.
+        self.assertFalse(fs.exists('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json'))
+        # self.assertFalse('https://github.com/w3c/testharness.js/archive/db4d391a69877d4a1eaaf51d1725c99a5b8ed84.tar.gz' in fs.read_text_file('/mock-checkout/LayoutTests/w3c/resources/web-platform-tests-modules.json'))
 
 
     # FIXME: Needs more tests.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to