[WinCairo] Enable WPT tests environment.
authorBasuke.Suzuki@sony.com <Basuke.Suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 09:29:33 +0000 (09:29 +0000)
committerBasuke.Suzuki@sony.com <Basuke.Suzuki@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2018 09:29:33 +0000 (09:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190128

Reviewed by Youenn Fablet.

Escaping backslash of the path not to confuse the JSON parser.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._prepare_config):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236718 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py

index 788c51f..618208f 100644 (file)
@@ -1,3 +1,15 @@
+2018-10-02  Basuke Suzuki  <Basuke.Suzuki@sony.com>
+
+        [WinCairo] Enable WPT tests environment.
+        https://bugs.webkit.org/show_bug.cgi?id=190128
+
+        Reviewed by Youenn Fablet.
+
+        Escaping backslash of the path not to confuse the JSON parser.
+
+        * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
+        (WebPlatformTestServer._prepare_config):
+
 2018-10-01  Ross Kirsling  <ross.kirsling@sony.com>
 
         [Win][DRT] Actually set "experimental:WebAnimationsCSSIntegrationEnabled" when requested
index 00b22f3..3d681a0 100755 (executable)
@@ -119,8 +119,9 @@ class WebPlatformTestServer(http_server_base.HttpServerBase):
         _log.debug('Copying WebKit web platform server config.json')
         config_wk_filename = self._filesystem.join(self._layout_root, "imported", "w3c", "resources", "config.json")
         if self._filesystem.isfile(config_wk_filename):
-            config_json = self._filesystem.read_text_file(config_wk_filename).replace("%CERTS_DIR%", self._filesystem.join(self._output_dir, "_wpt_certs"))
-            self._filesystem.write_text_file(self._config_filename, config_json)
+            config = json.loads(self._filesystem.read_text_file(config_wk_filename))
+            config['ssl']['openssl']['base_path'] = self._filesystem.join(self._output_dir, "_wpt_certs")
+            self._filesystem.write_text_file(self._config_filename, json.dumps(config))
 
     def _spawn_process(self):
         self._process = self._executive.popen(self._start_cmd, cwd=self._doc_root_path, shell=False, stdin=self._executive.PIPE, stdout=self._wsout, stderr=self._wsout)