Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2397723006: Update lint-test-expectations to check on FlagExpectations (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
index aeab09dde20179fa2e39015e4e2be5bae7305488..9fb216216f6e7be5e54461758da1a0b342d53a1f 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -1316,6 +1316,24 @@ class Port(object):
_log.warning("additional_expectations path '%s' does not exist", path)
return expectations
+ def all_expectations_dict(self):
+ """Returns an OrderedDict of name -> expectations strings (see:
+ |expectations_dict|), including all flag-specific expectation files."""
+ expectations = self.expectations_dict()
+
+ flag_path = self._filesystem.join(self.layout_tests_dir(), 'FlagExpectations')
+ if not self._filesystem.exists(flag_path):
+ return expectations
+
+ for (_, _, filenames) in self._filesystem.walk(flag_path):
+ if 'README.txt' in filenames:
+ filenames.remove('README.txt')
+ for filename in filenames:
+ path = self._filesystem.join(flag_path, filename)
+ expectations[path] = self._filesystem.read_text_file(path)
+
+ return expectations
+
def bot_expectations(self):
if not self.get_option('ignore_flaky_tests'):
return {}

Powered by Google App Engine
This is Rietveld 408576698