summaryrefslogtreecommitdiffstats
path: root/tools/valgrind
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 14:04:40 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-05 14:04:40 +0000
commitc8c8137657e86e91753556517a74052ca3705f19 (patch)
tree354770574a547b519ff9b3285a4dca87e6a3da3d /tools/valgrind
parente21ce0e9806decfb8fb840686db1fa2c8c2a0d9e (diff)
downloadchromium_src-c8c8137657e86e91753556517a74052ca3705f19.zip
chromium_src-c8c8137657e86e91753556517a74052ca3705f19.tar.gz
chromium_src-c8c8137657e86e91753556517a74052ca3705f19.tar.bz2
Use suppressions_mac.txt for Mac-specific reports
TBR=glider Review URL: http://codereview.chromium.org/3020069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind')
-rw-r--r--tools/valgrind/test_suppressions.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/tools/valgrind/test_suppressions.py b/tools/valgrind/test_suppressions.py
index ffb70f2..7473c9b 100644
--- a/tools/valgrind/test_suppressions.py
+++ b/tools/valgrind/test_suppressions.py
@@ -36,17 +36,15 @@ def ReadReportsFromFile(filename):
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 @@ for f in sys.argv[1:]:
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:"