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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 294973008: Add --sanitizer-mode to run-webkit-tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rename command line flag, add tests; ready for review Created 6 years, 7 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: Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index afc7b87c59c7da95b014efd3e38270e10fc36c62..5c02dc20b3693009d9403e4eca94ddef43529e79 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -884,6 +884,17 @@ class TestExpectations(object):
return expected_results
@staticmethod
+ def remove_non_sanitizer_failures(expected_results):
+ """Returns a copy of the expected results for a test, except that we
+ drop any failures that the sanitizers don't care about."""
+ expected_results = expected_results.copy()
+ for result in (IMAGE, FAIL, IMAGE_PLUS_TEXT):
+ if result in expected_results:
+ expected_results.remove(result)
+ expected_results.add(PASS)
+ return expected_results
+
+ @staticmethod
def has_pixel_failures(actual_results):
return IMAGE in actual_results or FAIL in actual_results
@@ -987,9 +998,11 @@ class TestExpectations(object):
def expectation_to_string(self, expectation):
return self._model.expectation_to_string(expectation)
- def matches_an_expected_result(self, test, result, pixel_tests_are_enabled):
+ def matches_an_expected_result(self, test, result, pixel_tests_are_enabled, sanitizer_is_enabled):
expected_results = self._model.get_expectations(test)
- if not pixel_tests_are_enabled:
+ if sanitizer_is_enabled:
+ expected_results = self.remove_non_sanitizer_failures(expected_results)
+ elif not pixel_tests_are_enabled:
expected_results = self.remove_pixel_failures(expected_results)
return self.result_was_expected(result, expected_results, self.is_rebaselining(test))

Powered by Google App Engine
This is Rietveld 408576698