OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 # suppressions.py | |
7 | |
8 """Valgrind-style suppressions for heapchecker reports. | 6 """Valgrind-style suppressions for heapchecker reports. |
9 | 7 |
10 Suppressions are defined as follows: | 8 Suppressions are defined as follows: |
11 | 9 |
12 # optional one-line comments anywhere in the suppressions file. | 10 # optional one-line comments anywhere in the suppressions file. |
13 { | 11 { |
14 Toolname:Errortype | 12 Toolname:Errortype |
15 Short description of the error. | 13 Short description of the error. |
16 fun:function_name | 14 fun:function_name |
17 fun:wildcarded_fun*_name | 15 fun:wildcarded_fun*_name |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 mixed = GenSupp('...', 'foo*', 'function') | 158 mixed = GenSupp('...', 'foo*', 'function') |
161 assert mixed.Match(['foobar', 'foobaz', 'function']) | 159 assert mixed.Match(['foobar', 'foobaz', 'function']) |
162 assert not mixed.Match(['foobar', 'blah', 'function']) | 160 assert not mixed.Match(['foobar', 'blah', 'function']) |
163 at_and_dollar = GenSupp('foo@GLIBC', 'bar@NOCANCEL') | 161 at_and_dollar = GenSupp('foo@GLIBC', 'bar@NOCANCEL') |
164 assert at_and_dollar.Match(['foo@GLIBC', 'bar@NOCANCEL']) | 162 assert at_and_dollar.Match(['foo@GLIBC', 'bar@NOCANCEL']) |
165 re_chars = GenSupp('.*') | 163 re_chars = GenSupp('.*') |
166 assert re_chars.Match(['.foobar']) | 164 assert re_chars.Match(['.foobar']) |
167 assert not re_chars.Match(['foobar']) | 165 assert not re_chars.Match(['foobar']) |
168 print 'PASS' | 166 print 'PASS' |
169 | 167 |
| 168 |
170 if __name__ == '__main__': | 169 if __name__ == '__main__': |
171 MatchTest() | 170 MatchTest() |
OLD | NEW |