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 # valgrind_test.py | 6 # valgrind_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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 proc += ["-suppress", suppression_file] | 747 proc += ["-suppress", suppression_file] |
748 | 748 |
749 if not suppression_count: | 749 if not suppression_count: |
750 logging.warning("WARNING: NOT USING SUPPRESSIONS!") | 750 logging.warning("WARNING: NOT USING SUPPRESSIONS!") |
751 | 751 |
752 # Un-comment to dump Dr.Memory events on error | 752 # Un-comment to dump Dr.Memory events on error |
753 #proc += ["-dr_ops", "-dumpcore_mask 0x8bff"] | 753 #proc += ["-dr_ops", "-dumpcore_mask 0x8bff"] |
754 | 754 |
755 proc += ["-logdir", self.temp_dir] | 755 proc += ["-logdir", self.temp_dir] |
756 proc += ["-batch", "-quiet"] | 756 proc += ["-batch", "-quiet"] |
757 proc += ["-no_check_leaks", "-no_count_leaks"] | 757 #proc += ["-no_check_leaks", "-no_count_leaks"] |
758 | 758 |
759 # Dr.Memory requires -- to separate tool flags from the executable name. | 759 # Dr.Memory requires -- to separate tool flags from the executable name. |
760 proc += ["--"] | 760 proc += ["--"] |
761 | 761 |
762 # Note that self._args begins with the name of the exe to be run. | 762 # Note that self._args begins with the name of the exe to be run. |
763 proc += self._args | 763 proc += self._args |
764 return proc | 764 return proc |
765 | 765 |
766 def Analyze(self, check_sanity=False): | 766 def Analyze(self, check_sanity=False): |
767 # Glob all the results files in the "testing.tmp" directory | 767 # Glob all the results files in the "testing.tmp" directory |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 platform_name = sys.platform + "(Unknown)" | 920 platform_name = sys.platform + "(Unknown)" |
921 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, | 921 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, |
922 platform_name) | 922 platform_name) |
923 | 923 |
924 def CreateTool(tool): | 924 def CreateTool(tool): |
925 return ToolFactory().Create(tool) | 925 return ToolFactory().Create(tool) |
926 | 926 |
927 if __name__ == '__main__': | 927 if __name__ == '__main__': |
928 logging.error(sys.argv[0] + " can not be run from command line") | 928 logging.error(sys.argv[0] + " can not be run from command line") |
929 sys.exit(1) | 929 sys.exit(1) |
OLD | NEW |