| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from collections import defaultdict | 5 from collections import defaultdict |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import path_utils | 10 import path_utils |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 if all([re.search("%20Mac%20|mac_valgrind", url) | 91 if all([re.search("%20Mac%20|mac_valgrind", url) |
| 92 for url in all_reports[r]]): | 92 for url in all_reports[r]]): |
| 93 # Include mac suppressions if the report is only present on Mac | 93 # Include mac suppressions if the report is only present on Mac |
| 94 cur_supp += mac_suppressions | 94 cur_supp += mac_suppressions |
| 95 elif all([re.search("Windows%20", url) for url in all_reports[r]]): | 95 elif all([re.search("Windows%20", url) for url in all_reports[r]]): |
| 96 # Include win32 suppressions if the report is only present on Windows | 96 # Include win32 suppressions if the report is only present on Windows |
| 97 cur_supp += win_suppressions | 97 cur_supp += win_suppressions |
| 98 elif all([re.search("%20Heapcheck", url) | 98 elif all([re.search("%20Heapcheck", url) |
| 99 for url in all_reports[r]]): | 99 for url in all_reports[r]]): |
| 100 cur_supp += heapcheck_suppressions | 100 cur_supp += heapcheck_suppressions |
| 101 elif all(["DrMemory%20full" in url for url in all_reports[r]]): | 101 if all(["DrMemory" in url for url in all_reports[r]]): |
| 102 cur_supp += drmem_suppressions + drmem_full_suppressions | |
| 103 elif all(["DrMemory" in url for url in all_reports[r]]): | |
| 104 cur_supp += drmem_suppressions | 102 cur_supp += drmem_suppressions |
| 103 if all(["DrMemory%20full" in url for url in all_reports[r]]): |
| 104 cur_supp += drmem_full_suppressions |
| 105 | 105 |
| 106 match = False | 106 match = False |
| 107 for s in cur_supp: | 107 for s in cur_supp: |
| 108 if s.Match(r.split("\n")): | 108 if s.Match(r.split("\n")): |
| 109 match = True | 109 match = True |
| 110 break | 110 break |
| 111 if not match: | 111 if not match: |
| 112 reports_count += 1 | 112 reports_count += 1 |
| 113 print "===================================" | 113 print "===================================" |
| 114 print "This report observed at" | 114 print "This report observed at" |
| 115 for url in all_reports[r]: | 115 for url in all_reports[r]: |
| 116 print " %s" % url | 116 print " %s" % url |
| 117 print "didn't match any suppressions:" | 117 print "didn't match any suppressions:" |
| 118 print "Suppression (error hash=#%s#):" % (report_hashes[r]) | 118 print "Suppression (error hash=#%s#):" % (report_hashes[r]) |
| 119 print r | 119 print r |
| 120 print "===================================" | 120 print "===================================" |
| 121 | 121 |
| 122 if reports_count > 0: | 122 if reports_count > 0: |
| 123 print ("%d unique reports don't match any of the suppressions" % | 123 print ("%d unique reports don't match any of the suppressions" % |
| 124 reports_count) | 124 reports_count) |
| 125 else: | 125 else: |
| 126 print "Congratulations! All reports are suppressed!" | 126 print "Congratulations! All reports are suppressed!" |
| 127 # TODO(timurrrr): also make sure none of the old suppressions | 127 # TODO(timurrrr): also make sure none of the old suppressions |
| 128 # were narrowed too much. | 128 # were narrowed too much. |
| 129 | 129 |
| 130 | 130 |
| 131 if __name__ == "__main__": | 131 if __name__ == "__main__": |
| 132 main(sys.argv[1:]) | 132 main(sys.argv[1:]) |
| OLD | NEW |