Title: [286817] trunk/Tools
Revision
286817
Author
[email protected]
Date
2021-12-09 16:30:40 -0800 (Thu, 09 Dec 2021)

Log Message

[webkitpy] Make check-webkit-style check WebDriverTests/TestExpectations.json
https://bugs.webkit.org/show_bug.cgi?id=213453

Reviewed by Adrian Perez de Castro.

While the WebDriver tests are imported and mostly ignored by
check-webkit-style, the script must check TestExpectations.json
to avoid commiting invalid json data and breaking the bots.

* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:
(CheckerDispatcherSkipTest._assert_should_skip_without_warning): Pass
a valid error handler so the JSONChecker can be instantiated.
(CheckerDispatcherSkipTest.test_should_skip_without_warning__false):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (286816 => 286817)


--- trunk/Tools/ChangeLog	2021-12-10 00:25:12 UTC (rev 286816)
+++ trunk/Tools/ChangeLog	2021-12-10 00:30:40 UTC (rev 286817)
@@ -1,3 +1,20 @@
+2021-12-09  Lauro Moura  <[email protected]>
+
+        [webkitpy] Make check-webkit-style check WebDriverTests/TestExpectations.json
+        https://bugs.webkit.org/show_bug.cgi?id=213453
+
+        Reviewed by Adrian Perez de Castro.
+
+        While the WebDriver tests are imported and mostly ignored by
+        check-webkit-style, the script must check TestExpectations.json
+        to avoid commiting invalid json data and breaking the bots.
+
+        * Scripts/webkitpy/style/checker.py:
+        * Scripts/webkitpy/style/checker_unittest.py:
+        (CheckerDispatcherSkipTest._assert_should_skip_without_warning): Pass
+        a valid error handler so the JSONChecker can be instantiated.
+        (CheckerDispatcherSkipTest.test_should_skip_without_warning__false):
+
 2021-12-09  Alex Christensen  <[email protected]>
 
         Prepare for transition to C++20

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (286816 => 286817)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2021-12-10 00:25:12 UTC (rev 286816)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2021-12-10 00:30:40 UTC (rev 286817)
@@ -368,6 +368,7 @@
 
 _NEVER_SKIPPED_FILES = _NEVER_SKIPPED_JS_FILES + [
     'TestExpectations',
+    'TestExpectations.json',
     '.py'
 ]
 

Modified: trunk/Tools/Scripts/webkitpy/style/checker_unittest.py (286816 => 286817)


--- trunk/Tools/Scripts/webkitpy/style/checker_unittest.py	2021-12-10 00:25:12 UTC (rev 286816)
+++ trunk/Tools/Scripts/webkitpy/style/checker_unittest.py	2021-12-10 00:30:40 UTC (rev 286817)
@@ -319,7 +319,7 @@
                                             expected):
         # Check the file type before asserting the return value.
         checker = self._dispatcher.dispatch(file_path=path,
-                                            handle_style_error=None,
+                                            handle_style_error=DefaultStyleErrorHandler('', None, None, []),
                                             min_confidence=3,
                                             commit_queue=False)
         message = 'while checking: %s' % path
@@ -348,6 +348,8 @@
         paths = ['foo.txt',
                  os.path.join('LayoutTests', 'ChangeLog'),
                  os.path.join('LayoutTests', 'foo.py'),
+                 os.path.join('WebDriverTests', 'ChangeLog'),
+                 os.path.join('WebDriverTests', 'TestExpectations.json'),
         ]
 
         for path in paths:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to