Title: [254479] trunk/Tools
- Revision
- 254479
- Author
- [email protected]
- Date
- 2020-01-13 17:37:33 -0800 (Mon, 13 Jan 2020)
Log Message
Fix path-specific filters on Windows
https://bugs.webkit.org/show_bug.cgi?id=205786
Reviewed by David Kilzer.
* Scripts/webkitpy/style/filter.py:
(FilterConfiguration._path_rules_from_path):
Convert forward slashes to backward slashes on Windows by using
os.path.normcase(). Nothing changed on other OSs.
* Scripts/webkitpy/style/filter_unittest.py:
(FilterConfigurationTest.test_path_with_different_case):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (254478 => 254479)
--- trunk/Tools/ChangeLog 2020-01-14 01:10:16 UTC (rev 254478)
+++ trunk/Tools/ChangeLog 2020-01-14 01:37:33 UTC (rev 254479)
@@ -1,3 +1,17 @@
+2020-01-13 Yoshiaki Jitsukawa <[email protected]>
+
+ Fix path-specific filters on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=205786
+
+ Reviewed by David Kilzer.
+
+ * Scripts/webkitpy/style/filter.py:
+ (FilterConfiguration._path_rules_from_path):
+ Convert forward slashes to backward slashes on Windows by using
+ os.path.normcase(). Nothing changed on other OSs.
+ * Scripts/webkitpy/style/filter_unittest.py:
+ (FilterConfigurationTest.test_path_with_different_case):
+
2020-01-13 David Kilzer <[email protected]>
WTR::TestController::decidePolicyForPluginLoad() should output bundle identifier on release assert
Modified: trunk/Tools/Scripts/webkitpy/style/filter.py (254478 => 254479)
--- trunk/Tools/Scripts/webkitpy/style/filter.py 2020-01-14 01:10:16 UTC (rev 254478)
+++ trunk/Tools/Scripts/webkitpy/style/filter.py 2020-01-14 01:37:33 UTC (rev 254479)
@@ -22,6 +22,7 @@
"""Contains filter-related code."""
+import os.path
def validate_filter_rules(filter_rules, all_categories):
"""Validate the given filter rules, and raise a ValueError if not valid.
@@ -209,6 +210,7 @@
"""
path = path.lower()
+ path = os.path.normcase(path)
for (sub_paths, path_rules) in self._get_path_specific_lower():
for sub_path in sub_paths:
if path.find(sub_path) > -1:
Modified: trunk/Tools/Scripts/webkitpy/style/filter_unittest.py (254478 => 254479)
--- trunk/Tools/Scripts/webkitpy/style/filter_unittest.py 2020-01-14 01:10:16 UTC (rev 254478)
+++ trunk/Tools/Scripts/webkitpy/style/filter_unittest.py 2020-01-14 01:37:33 UTC (rev 254479)
@@ -23,6 +23,7 @@
"""Unit tests for filter.py."""
import unittest
+import os
from webkitpy.style.filter import _CategoryFilter as CategoryFilter
from webkitpy.style.filter import validate_filter_rules
@@ -234,7 +235,7 @@
def test_path_with_different_case(self):
"""Test a path that differs only in case."""
base_rules = ["-"]
- path_specific = [(["Foo/"], ["+whitespace"])]
+ path_specific = [([os.path.join("Foo", "")], ["+whitespace"])]
user_rules = []
config = self._config(base_rules, path_specific, user_rules)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes