summaryrefslogtreecommitdiffstats
path: root/webkit/tools/layout_tests/layout_package/test_expectations.py
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools/layout_tests/layout_package/test_expectations.py')
-rw-r--r--webkit/tools/layout_tests/layout_package/test_expectations.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/webkit/tools/layout_tests/layout_package/test_expectations.py b/webkit/tools/layout_tests/layout_package/test_expectations.py
index 0d343ca..a96aded 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)