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

Unified Diff: webkit/tools/layout_tests/layout_package/test_expectations.py

Issue 40151: Fix _ValidateLists to work when running in linting mode. (Closed)
Patch Set: Fix 80 char violation Created 11 years, 10 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: webkit/tools/layout_tests/layout_package/test_expectations.py
diff --git a/webkit/tools/layout_tests/layout_package/test_expectations.py b/webkit/tools/layout_tests/layout_package/test_expectations.py
index 28dade7f7f3fcece573eb006f8a42b6d23b624a4..1b692f54236a200a75c35393893ab2b3d17f8c97 100644
--- a/webkit/tools/layout_tests/layout_package/test_expectations.py
+++ b/webkit/tools/layout_tests/layout_package/test_expectations.py
@@ -119,9 +119,27 @@ class TestExpectations:
def _ValidateLists(self):
# Make sure there's no overlap between the tests in the two files.
- overlap = self._fixable.GetTests() & self._ignored.GetTests()
+ if self._tests:
+ relativizeFilenames = True
+ overlap = self._fixable.GetTests() & self._ignored.GetTests()
+ else:
+ relativizeFilenames = False
+ # If self._tests is None, then we have no way of expanding test paths
+ # So they remain shortened (e.g. LayoutTests/mac doesn't get expanded to
+ # include LayoutTests/mac/foo.html). So find duplicate prefixes
+ # instead of exact matches.
+ overlap = [];
+ for fixableTest in self._fixable.GetTests():
+ for ignoredTest in self._ignored.GetTests():
+ # Add both tests so they both get printed
+ if (fixableTest.startswith(ignoredTest) or
+ ignoredTest.startswith(fixableTest)):
+ overlap.append(fixableTest)
+ overlap.append(ignoredTest)
+
message = "Files contained in both " + self.FIXABLE + " and " + self.IGNORED
- compare_failures.PrintFilesFromSet(overlap, message, sys.stdout)
+ compare_failures.PrintFilesFromSet(overlap, message, sys.stdout,
+ opt_relativizeFilenames=relativizeFilenames)
assert(len(overlap) == 0)
# Make sure there are no ignored tests expected to crash.
assert(len(self._ignored.GetTestsExpectedTo(CRASH)) == 0)
« no previous file with comments | « webkit/tools/layout_tests/layout_package/compare_failures.py ('k') | webkit/tools/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698