| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS 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 | 6 |
| 7 """Parses and displays the contents of one or more autoserv result directories. | 7 """Parses and displays the contents of one or more autoserv result directories. |
| 8 | 8 |
| 9 This script parses the contents of one or more autoserv results folders and | 9 This script parses the contents of one or more autoserv results folders and |
| 10 generates test reports. | 10 generates test reports. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 | 13 |
| 14 import glob | 14 import glob |
| 15 import optparse | 15 import optparse |
| 16 import os | 16 import os |
| 17 import re | 17 import re |
| 18 import sys | 18 import sys |
| 19 | 19 |
| 20 import constants | 20 import constants |
| 21 sys.path.append(constants.CROSUTILS_LIB_DIR) | 21 sys.path.append(constants.CROSUTILS_LIB_DIR) |
| 22 from cros_build_lib import Color, Die | 22 from cros_build_lib import Color, Die |
| 23 | 23 |
| 24 _STDOUT_IS_TTY = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() | 24 _STDOUT_IS_TTY = hasattr(sys.stdout, 'isatty') and sys.stdout.isatty() |
| 25 | 25 |
| 26 # List of crashes which are okay to ignore. This list should almost always be | 26 # List of crashes which are okay to ignore. This list should almost always be |
| 27 # empty. If you add an entry, mark it with a TODO(<your name>) and the issue | 27 # empty. If you add an entry, mark it with a TODO(<your name>) and the issue |
| 28 # filed for the crash. | 28 # filed for the crash. |
| 29 _CRASH_WHITELIST = { | 29 _CRASH_WHITELIST = { |
| 30 # TODO(dalecurtis): Remove once http://crosbug.com/13678 is fixed. | 30 # TODO(dalecurtis): Remove once http://crosbug.com/13733 is fixed. |
| 31 'chromeos-wm': ['sig 6'], | 31 'chromeos-wm': ['sig 6'], |
| 32 | 32 |
| 33 # TODO(dalecurtis): Remove once http://crosbug.com/13763 is fixed. |
| 34 'console-kit-daemon': ['sig 11'], |
| 35 |
| 33 # TODO(dalecurtis): Remove once http://crosbug.com/13377 is fixed. | 36 # TODO(dalecurtis): Remove once http://crosbug.com/13377 is fixed. |
| 34 'SynTPEnh': ['sig 6', 'sig 11'] | 37 'SynTPEnh': ['sig 6', 'sig 11'] |
| 35 } | 38 } |
| 36 | 39 |
| 37 | 40 |
| 38 class ResultCollector(object): | 41 class ResultCollector(object): |
| 39 """Collects status and performance data from an autoserv results directory.""" | 42 """Collects status and performance data from an autoserv results directory.""" |
| 40 | 43 |
| 41 def __init__(self, collect_perf=True, strip_text=''): | 44 def __init__(self, collect_perf=True, strip_text=''): |
| 42 """Initialize ResultsCollector class. | 45 """Initialize ResultsCollector class. |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 if not args: | 347 if not args: |
| 345 parser.print_help() | 348 parser.print_help() |
| 346 Die('no result directories provided') | 349 Die('no result directories provided') |
| 347 | 350 |
| 348 generator = ReportGenerator(options, args) | 351 generator = ReportGenerator(options, args) |
| 349 generator.Run() | 352 generator.Run() |
| 350 | 353 |
| 351 | 354 |
| 352 if __name__ == '__main__': | 355 if __name__ == '__main__': |
| 353 main() | 356 main() |
| OLD | NEW |