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

Unified Diff: tools/foozzie/v8_suppressions.py

Issue 2634743004: [foozzie] Stop using extra metadata files. (Closed)
Patch Set: Refactoring, cleanup, docu Created 3 years, 11 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
« no previous file with comments | « tools/foozzie/v8_foozzie_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/foozzie/v8_suppressions.py
diff --git a/tools/foozzie/v8_suppressions.py b/tools/foozzie/v8_suppressions.py
index 66128e07b3f8611afbc5d76bc745b002c860b551..e0293b52b2d1db4d1a8cf9f97c68608eaa852a37 100644
--- a/tools/foozzie/v8_suppressions.py
+++ b/tools/foozzie/v8_suppressions.py
@@ -182,13 +182,15 @@ def ignore_by_regexp(line1, line2, allowed):
def diff_output(output1, output2, allowed, ignore1, ignore2):
- """Returns a tuple (difference, source_key).
+ """Returns a tuple (difference, source, source_key).
The difference is None if there's no difference, otherwise a string
with a readable diff.
- The source_key is a short hash of the last source output within the test
- case. It is the string 'none' if no such output existed.
+ The source is the last source output within the test case. It is the string
+ 'none' if no such output existed.
mmoroz 2017/01/16 12:39:58 nit: maybe it makes sense to put 'none' string int
Michael Achenbach 2017/01/16 12:58:41 Done.
+
+ The source_key is a short hash of source or 'none'.
"""
def useful_line(ignore):
def fun(line):
@@ -200,6 +202,7 @@ def diff_output(output1, output2, allowed, ignore1, ignore2):
# This keeps track where we are in the original source file of the fuzz
# test case.
+ source = 'none'
source_key = 'none'
for ((line1, lookahead1), (line2, lookahead2)) in itertools.izip_longest(
@@ -210,9 +213,9 @@ def diff_output(output1, output2, allowed, ignore1, ignore2):
# One iterator ends earlier.
if line1 is None:
- return '+ %s' % short_line_output(line2), source_key
+ return '+ %s' % short_line_output(line2), source, source_key
if line2 is None:
- return '- %s' % short_line_output(line1), source_key
+ return '- %s' % short_line_output(line1), source, source_key
# If lines are equal, no further checks are necessary.
if line1 == line2:
@@ -235,11 +238,12 @@ def diff_output(output1, output2, allowed, ignore1, ignore2):
# Lines are different.
return (
'- %s\n+ %s' % (short_line_output(line1), short_line_output(line2)),
+ source,
source_key,
)
# No difference found.
- return None, source_key
+ return None, source, source_key
def get_suppression(arch1, config1, arch2, config2):
« no previous file with comments | « tools/foozzie/v8_foozzie_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698