Bug 1453391 [wpt PR 10431] - Unbreak wdspec tests after config changes, a=testonly
authorJames Graham <james@hoppipolla.co.uk>
Thu, 19 Apr 2018 21:24:56 +0000
changeset 468429 a688c9e332cff16f0a4f51f433b0aad7b031033c
parent 468428 60313f058ff820e933c94189028e66eaee37b8c6
child 468430 8873ccf4aaee86862536617b03fd6dce5a8f2a38
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1453391, 10431
milestone61.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 1453391 [wpt PR 10431] - Unbreak wdspec tests after config changes, a=testonly Automatic update from web-platform-testsAdd support for serializing the config as a dictionary. This is required to pass the config into the wdspec tests. -- s/host/browser_host/ in wdspec fixture -- wpt-commits: ddcc729bca5abcc460db875952eb693b04fe2e41, 4b3342e16f320b69fef3c1809bb2614dc2109590 wpt-pr: 10431 wpt-commits: ddcc729bca5abcc460db875952eb693b04fe2e41, 4b3342e16f320b69fef3c1809bb2614dc2109590 wpt-pr: 10431
testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
testing/web-platform/tests/tools/wptserve/wptserve/config.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/executors/pytestrunner/runner.py
@@ -39,17 +39,17 @@ def run(path, server_config, session_con
         where <subtest result> is (test id, status, message, stacktrace).
     """
     if pytest is None:
         do_delayed_imports()
 
     os.environ["WD_HOST"] = session_config["host"]
     os.environ["WD_PORT"] = str(session_config["port"])
     os.environ["WD_CAPABILITIES"] = json.dumps(session_config["capabilities"])
-    os.environ["WD_SERVER_CONFIG"] = json.dumps(server_config)
+    os.environ["WD_SERVER_CONFIG"] = json.dumps(server_config.as_dict())
 
     harness = HarnessResultRecorder()
     subtests = SubtestResultRecorder()
 
     with TemporaryDirectory() as cache:
         try:
             pytest.main(["--strict",  # turn warnings into errors
                          "-vv",  # show each individual subtest and full failure logs
--- a/testing/web-platform/tests/tools/wptserve/wptserve/config.py
+++ b/testing/web-platform/tests/tools/wptserve/wptserve/config.py
@@ -209,8 +209,17 @@ class Config(Mapping):
                 "ws_doc_root": self.ws_doc_root}
 
     @property
     def ssl_config(self):
         key_path, cert_path = self.ssl_env.host_cert_path(self.domains)
         return {"key_path": key_path,
                 "cert_path": cert_path,
                 "encrypt_after_connect": self.ssl["encrypt_after_connect"]}
+
+    def as_dict(self):
+        rv = {
+            "domains": list(self.domains),
+            "sundomains": list(self.subdomains),
+        }
+        for item in self._default.iterkeys():
+            rv[item] = getattr(self, item)
+        return rv