| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 def Setup(self): | 65 def Setup(self): |
| 66 return self.ParseArgv() | 66 return self.ParseArgv() |
| 67 | 67 |
| 68 def Execute(self): | 68 def Execute(self): |
| 69 ''' Execute the app to be tested after successful instrumentation. | 69 ''' Execute the app to be tested after successful instrumentation. |
| 70 Full execution command-line provided by subclassers via proc.''' | 70 Full execution command-line provided by subclassers via proc.''' |
| 71 logging.info("starting execution...") | 71 logging.info("starting execution...") |
| 72 # note that self._args begins with the exe to be run | 72 # note that self._args begins with the exe to be run |
| 73 proc = ["valgrind", "--smc-check=all", "--leak-check=full", | 73 proc = ["valgrind", "--smc-check=all", "--leak-check=full", |
| 74 "--track-origins=yes", "--num-callers=30"] | 74 "--num-callers=30"] |
| 75 | 75 |
| 76 # Either generate suppressions or load them. | 76 # Either generate suppressions or load them. |
| 77 if self._generate_suppressions: | 77 if self._generate_suppressions: |
| 78 proc += ["--gen-suppressions=all"] | 78 proc += ["--gen-suppressions=all"] |
| 79 else: | 79 else: |
| 80 proc += ["--xml=yes"] | 80 proc += ["--xml=yes"] |
| 81 | 81 |
| 82 suppression_count = 0 | 82 suppression_count = 0 |
| 83 for suppression_file in self._suppressions: | 83 for suppression_file in self._suppressions: |
| 84 if os.path.exists(suppression_file): | 84 if os.path.exists(suppression_file): |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return retcode | 149 return retcode |
| 150 | 150 |
| 151 | 151 |
| 152 | 152 |
| 153 if __name__ == "__main__": | 153 if __name__ == "__main__": |
| 154 valgrind = Valgrind() | 154 valgrind = Valgrind() |
| 155 retcode = valgrind.Main() | 155 retcode = valgrind.Main() |
| 156 sys.exit(retcode) | 156 sys.exit(retcode) |
| 157 | 157 |
| 158 | 158 |
| OLD | NEW |