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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.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_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 6e868de69a1536d42e39921e65a78601c7e912b5..b81a9bf46a0f765ad47780d6962cdb446af618e6 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -63,8 +63,10 @@ class Base(unittest.TestCase):
self.get_test('failures/expected/needsmanualrebaseline.html'),
self.get_test('failures/expected/missing_text.html'),
self.get_test('failures/expected/image.html'),
+ self.get_test('failures/expected/timeout.html'),
self.get_test('passes/text.html')]
+
def get_basic_expectations(self):
return """
Bug(test) failures/expected/text.html [ Failure ]
@@ -248,7 +250,7 @@ expectations:2 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseli
def test_pixel_tests_flag(self):
def match(test, result, pixel_tests_enabled):
return self._exp.matches_an_expected_result(
- self.get_test(test), result, pixel_tests_enabled)
+ self.get_test(test), result, pixel_tests_enabled, sanitizer_is_enabled=False)
self.parse_exp(self.get_basic_expectations())
self.assertTrue(match('failures/expected/text.html', FAIL, True))
@@ -264,6 +266,22 @@ expectations:2 A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseli
self.assertFalse(match('failures/expected/needsmanualrebaseline.html', CRASH, True))
self.assertTrue(match('passes/text.html', PASS, False))
+ def test_sanitizer_flag(self):
+ def match(test, result):
+ return self._exp.matches_an_expected_result(
+ self.get_test(test), result, pixel_tests_are_enabled=False, sanitizer_is_enabled=True)
+
+ self.parse_exp("""
+Bug(test) failures/expected/crash.html [ Crash ]
+Bug(test) failures/expected/image.html [ ImageOnlyFailure ]
+Bug(test) failures/expected/text.html [ Failure ]
+Bug(test) failures/expected/timeout.html [ Timeout ]
+""")
+ self.assertTrue(match('failures/expected/crash.html', CRASH))
+ self.assertTrue(match('failures/expected/image.html', PASS))
+ self.assertTrue(match('failures/expected/text.html', PASS))
+ self.assertTrue(match('failures/expected/timeout.html', TIMEOUT))
+
def test_more_specific_override_resets_skip(self):
self.parse_exp("Bug(x) failures/expected [ Skip ]\n"
"Bug(x) failures/expected/text.html [ ImageOnlyFailure ]\n")

Powered by Google App Engine
This is Rietveld 408576698