OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import argparse | 6 import argparse |
7 from collections import defaultdict | 7 from collections import defaultdict |
8 import json | 8 import json |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 all_reports[report] += [url] | 136 all_reports[report] += [url] |
137 report_hashes[report] = hash | 137 report_hashes[report] = hash |
138 | 138 |
139 reports_count = 0 | 139 reports_count = 0 |
140 for r in all_reports: | 140 for r in all_reports: |
141 cur_supp = supp['common_suppressions'] | 141 cur_supp = supp['common_suppressions'] |
142 if all([re.search("%20Mac%20|mac_valgrind", url) | 142 if all([re.search("%20Mac%20|mac_valgrind", url) |
143 for url in all_reports[r]]): | 143 for url in all_reports[r]]): |
144 # Include mac suppressions if the report is only present on Mac | 144 # Include mac suppressions if the report is only present on Mac |
145 cur_supp += supp['mac_suppressions'] | 145 cur_supp += supp['mac_suppressions'] |
146 elif all([re.search("Windows%20", url) for url in all_reports[r]]): | |
147 # Include win32 suppressions if the report is only present on Windows | |
148 cur_supp += supp['win_suppressions'] | |
149 elif all([re.search("Linux%20", url) for url in all_reports[r]]): | 146 elif all([re.search("Linux%20", url) for url in all_reports[r]]): |
150 cur_supp += supp['linux_suppressions'] | 147 cur_supp += supp['linux_suppressions'] |
151 if all(["DrMemory" in url for url in all_reports[r]]): | 148 if all(["DrMemory" in url for url in all_reports[r]]): |
152 cur_supp += supp['drmem_suppressions'] | 149 cur_supp += supp['drmem_suppressions'] |
153 if all(["DrMemory%20full" in url for url in all_reports[r]]): | 150 if all(["DrMemory%20full" in url for url in all_reports[r]]): |
154 cur_supp += supp['drmem_full_suppressions'] | 151 cur_supp += supp['drmem_full_suppressions'] |
155 | 152 |
156 # Test if this report is already suppressed | 153 # Test if this report is already suppressed |
157 skip = False | 154 skip = False |
158 for s in cur_supp: | 155 for s in cur_supp: |
(...skipping 30 matching lines...) Expand all Loading... |
189 PrintTopSymbols(symbol_reports, args.top_symbols) | 186 PrintTopSymbols(symbol_reports, args.top_symbols) |
190 | 187 |
191 else: | 188 else: |
192 print "Congratulations! All reports are suppressed!" | 189 print "Congratulations! All reports are suppressed!" |
193 # TODO(timurrrr): also make sure none of the old suppressions | 190 # TODO(timurrrr): also make sure none of the old suppressions |
194 # were narrowed too much. | 191 # were narrowed too much. |
195 | 192 |
196 | 193 |
197 if __name__ == "__main__": | 194 if __name__ == "__main__": |
198 main(sys.argv[1:]) | 195 main(sys.argv[1:]) |
OLD | NEW |