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

Unified Diff: tools/valgrind/test_suppressions.py

Issue 3020069: Use suppressions_mac.txt for Mac-specific reports (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/test_suppressions.py
===================================================================
--- tools/valgrind/test_suppressions.py (revision 55052)
+++ tools/valgrind/test_suppressions.py (working copy)
@@ -36,18 +36,16 @@
cur_supp = ["{"]
return reports,line
-filenames = [
- "memcheck/suppressions.txt",
-]
-# TODO(timurrrr): Support platform-specific suppressions
-
-all_suppressions = []
suppressions_root = path_utils.ScriptDir()
-for f in filenames:
- supp_filename = os.path.join(suppressions_root, f)
- all_suppressions += suppressions.ReadSuppressionsFromFile(supp_filename)
+supp_filename = os.path.join(suppressions_root,
+ "memcheck", "suppressions.txt")
+common_suppressions = suppressions.ReadSuppressionsFromFile(supp_filename)
+supp_filename = os.path.join(suppressions_root,
+ "memcheck", "suppressions_mac.txt")
+mac_suppressions = suppressions.ReadSuppressionsFromFile(supp_filename)
+
# all_reports is a map {report: list of urls containing this report}
all_reports = defaultdict(list)
@@ -58,15 +56,22 @@
reports_count = 0
for r in all_reports:
+ if set([False]) == set([not re.search("%20Mac%20", url)\
+ for url in all_reports[r]]):
+ # Include mac suppressions if the report is only present on Mac
+ cur_supp = common_suppressions + mac_suppressions
+ else:
+ cur_supp = common_suppressions
+
match = False
- for s in all_suppressions:
+ for s in cur_supp:
if s.Match(r.split("\n")):
match = True
break
if not match:
reports_count += 1
print "==================================="
- print "This report observed in:"
+ print "This report observed at"
for url in all_reports[r]:
print " %s" % url
print "didn't match any suppressions:"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698