Commit 2178590a authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[foozzie] Fix detection of suppression delimiter

NOTRY=true
TBR=jkummerow@chromium.org,bmeurer@chromium.org

Bug: chromium:718739
Change-Id: I9b80a3098bf2c8d3a294e1908f058cabe1ed758c
Reviewed-on: https://chromium-review.googlesource.com/506092Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45322}
parent b0ce3b6f
......@@ -276,9 +276,14 @@ class V8Suppression(Suppression):
def ignore_by_content(self, testcase):
# Strip off test case preamble.
try:
lines = testcase.splitlines()
lines = lines[lines.index('print("js-mutation: start generated test case");'):]
content = '\n'.join(lines)
except ValueError:
# Search the whole test case if preamble can't be found. E.g. older
# already minimized test cases might have dropped the delimiter line.
content = testcase
for bug, exp in IGNORE_TEST_CASES.iteritems():
if exp.search(content):
return bug
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment