| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 # purify_test.py | 6 # purify_test.py |
| 7 | 7 |
| 8 '''Runs an exe through Valgrind and puts the intermediate files in a | 8 '''Runs an exe through Valgrind and puts the intermediate files in a |
| 9 directory. | 9 directory. |
| 10 ''' | 10 ''' |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 def ValgrindCommand(self): | 188 def ValgrindCommand(self): |
| 189 """Get the valgrind command to run.""" | 189 """Get the valgrind command to run.""" |
| 190 # note that self._args begins with the exe to be run | 190 # note that self._args begins with the exe to be run |
| 191 | 191 |
| 192 if self._options.custom_valgrind_command: | 192 if self._options.custom_valgrind_command: |
| 193 # take the full valgrind command from --custom_valgrind_command | 193 # take the full valgrind command from --custom_valgrind_command |
| 194 proc = self._options.custom_valgrind_command.split() | 194 proc = self._options.custom_valgrind_command.split() |
| 195 else: | 195 else: |
| 196 # construct the valgrind command | 196 # construct the valgrind command |
| 197 proc = ["valgrind", "--smc-check=all", "--leak-check=full", | 197 proc = ["valgrind", "--smc-check=all", "--leak-check=full", |
| 198 "--num-callers=30"] | 198 "--num-callers=50"] |
| 199 | 199 |
| 200 if self._options.show_all_leaks: | 200 if self._options.show_all_leaks: |
| 201 proc += ["--show-reachable=yes"]; | 201 proc += ["--show-reachable=yes"]; |
| 202 | 202 |
| 203 if self._options.track_origins: | 203 if self._options.track_origins: |
| 204 proc += ["--track-origins=yes"]; | 204 proc += ["--track-origins=yes"]; |
| 205 | 205 |
| 206 if self._options.trace_children: | 206 if self._options.trace_children: |
| 207 proc += ["--trace-children=yes"]; | 207 proc += ["--trace-children=yes"]; |
| 208 | 208 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 valgrind = ValgrindMac() | 325 valgrind = ValgrindMac() |
| 326 retcode = valgrind.Main() | 326 retcode = valgrind.Main() |
| 327 sys.exit(retcode) | 327 sys.exit(retcode) |
| 328 elif sys.platform == 'linux2': # Linux | 328 elif sys.platform == 'linux2': # Linux |
| 329 valgrind = ValgrindLinux() | 329 valgrind = ValgrindLinux() |
| 330 retcode = valgrind.Main() | 330 retcode = valgrind.Main() |
| 331 sys.exit(retcode) | 331 sys.exit(retcode) |
| 332 else: | 332 else: |
| 333 logging.error("Unknown platform: %s" % sys.platform) | 333 logging.error("Unknown platform: %s" % sys.platform) |
| 334 sys.exit(1) | 334 sys.exit(1) |
| OLD | NEW |