https://trac.webkit.org/changeset/179439 breaks a python test
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jan 2015 11:24:04 +0000 (11:24 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 Jan 2015 11:24:04 +0000 (11:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141114

Unreviewed.

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer._install_modules): Checks whether WPTModules file exists before reading it as no such file exists in mock tests.

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

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

index 1e14637f4da9bbceeadcff2b1127e691649a7b54..03adbfc171cc98241aa7482b42da75c20db12f9c 100644 (file)
@@ -1,3 +1,13 @@
+2015-01-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
+
+        https://trac.webkit.org/changeset/179439 breaks a python test
+        https://bugs.webkit.org/show_bug.cgi?id=141114
+
+        Unreviewed.
+
+        * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
+        (WebPlatformTestServer._install_modules): Checks whether WPTModules file exists before reading it as no such file exists in mock tests.  
+
 2015-01-31  Youenn Fablet  <youenn.fablet@crf.canon.fr>
 
         Import W3C web platform tests infrastructure
index 61b681c8f7bb6485f5cdaea06e2d7ec0845653d2..76c23dae03051aeba022118c019c65c7988e8f8d 100755 (executable)
@@ -77,7 +77,11 @@ class WebPlatformTestServer(http_server_base.HttpServerBase):
         self._doc_root_path = port_obj.path_from_webkit_base("LayoutTests", self._doc_root)
 
     def _install_modules(self):
-        modules = json.loads(self._filesystem.read_text_file(self._filesystem.join(self._layout_root, "imported", "w3c", "resources", "WPTModules")))
+        modules_file_path = self._filesystem.join(self._layout_root, "imported", "w3c", "resources", "WPTModules")
+        if not self._filesystem.isfile(modules_file_path):
+            _log.warning("Cannot read " + modules_file_path)
+            return
+        modules = json.loads(self._filesystem.read_text_file(modules_file_path))
         for module in modules:
             AutoInstaller(target_dir=self._filesystem.join(self._doc_root, module["path"])).install(url=module["url"], url_subpath=module["url_subpath"], target_name=module["name"])