diff options
author | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 14:04:40 +0000 |
---|---|---|
committer | timurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 14:04:40 +0000 |
commit | c8c8137657e86e91753556517a74052ca3705f19 (patch) | |
tree | 354770574a547b519ff9b3285a4dca87e6a3da3d /tools/valgrind | |
parent | e21ce0e9806decfb8fb840686db1fa2c8c2a0d9e (diff) | |
download | chromium_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.py | 27 |
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:" |