| 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 """Runs an exe through Valgrind and puts the intermediate files in a | 5 """Runs an exe through Valgrind and puts the intermediate files in a |
| 6 directory. | 6 directory. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import datetime | 9 import datetime |
| 10 import glob | 10 import glob |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 def RegisterOptionParserHook(self, hook): | 69 def RegisterOptionParserHook(self, hook): |
| 70 # Frameworks and tools can add their own flags to the parser. | 70 # Frameworks and tools can add their own flags to the parser. |
| 71 self.option_parser_hooks.append(hook) | 71 self.option_parser_hooks.append(hook) |
| 72 | 72 |
| 73 def CreateOptionParser(self): | 73 def CreateOptionParser(self): |
| 74 # Defines Chromium-specific flags. | 74 # Defines Chromium-specific flags. |
| 75 self._parser = optparse.OptionParser("usage: %prog [options] <program to " | 75 self._parser = optparse.OptionParser("usage: %prog [options] <program to " |
| 76 "test>") | 76 "test>") |
| 77 self._parser.disable_interspersed_args() | 77 self._parser.disable_interspersed_args() |
| 78 self._parser.add_option("-t", "--timeout", | 78 self._parser.add_option("-t", "--timeout", |
| 79 dest="timeout", metavar="TIMEOUT", default=10000, | 79 dest="timeout", metavar="TIMEOUT", default=100000, |
| 80 help="timeout in seconds for the run (default 10000)") | 80 help="timeout in seconds for the run (default 100000)") |
| 81 self._parser.add_option("", "--build-dir", | 81 self._parser.add_option("", "--build-dir", |
| 82 help="the location of the compiler output") | 82 help="the location of the compiler output") |
| 83 self._parser.add_option("", "--source-dir", | 83 self._parser.add_option("", "--source-dir", |
| 84 help="path to top of source tree for this build" | 84 help="path to top of source tree for this build" |
| 85 "(used to normalize source paths in baseline)") | 85 "(used to normalize source paths in baseline)") |
| 86 self._parser.add_option("", "--gtest_filter", default="", | 86 self._parser.add_option("", "--gtest_filter", default="", |
| 87 help="which test case to run") | 87 help="which test case to run") |
| 88 self._parser.add_option("", "--gtest_repeat", | 88 self._parser.add_option("", "--gtest_repeat", |
| 89 help="how many times to run each test") | 89 help="how many times to run each test") |
| 90 self._parser.add_option("", "--gtest_print_time", action="store_true", | 90 self._parser.add_option("", "--gtest_print_time", action="store_true", |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 return DrMemory(False, True) | 478 return DrMemory(False, True) |
| 479 try: | 479 try: |
| 480 platform_name = common.PlatformNames()[0] | 480 platform_name = common.PlatformNames()[0] |
| 481 except common.NotImplementedError: | 481 except common.NotImplementedError: |
| 482 platform_name = sys.platform + "(Unknown)" | 482 platform_name = sys.platform + "(Unknown)" |
| 483 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, | 483 raise RuntimeError, "Unknown tool (tool=%s, platform=%s)" % (tool_name, |
| 484 platform_name) | 484 platform_name) |
| 485 | 485 |
| 486 def CreateTool(tool): | 486 def CreateTool(tool): |
| 487 return ToolFactory().Create(tool) | 487 return ToolFactory().Create(tool) |
| OLD | NEW |