Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import optparse | 5 import optparse |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 | 8 |
| 9 from telemetry.core import util | 9 from telemetry.core import util |
| 10 from telemetry.results import buildbot_output_formatter | 10 from telemetry.results import buildbot_output_formatter |
| 11 from telemetry.results import csv_output_formatter | 11 from telemetry.results import csv_output_formatter |
| 12 from telemetry.results import gtest_progress_reporter | 12 from telemetry.results import gtest_progress_reporter |
| 13 from telemetry.results import html_output_formatter | 13 from telemetry.results import html_output_formatter |
| 14 from telemetry.results import json_output_formatter | 14 from telemetry.results import json_output_formatter |
| 15 from telemetry.results import page_test_results | 15 from telemetry.results import page_test_results |
| 16 from telemetry.results import progress_reporter | 16 from telemetry.results import progress_reporter |
| 17 | 17 |
| 18 | 18 |
| 19 # Allowed output formats. The default is the first item in the list. | 19 # Allowed output formats. The default is the first item in the list. |
| 20 _OUTPUT_FORMAT_CHOICES = ('html', 'buildbot', 'block', 'csv', 'gtest', | 20 _OUTPUT_FORMAT_CHOICES = ('html', 'buildbot', 'block', 'csv', 'gtest', 'json', |
|
nduca
2014/08/13 00:55:39
this change isn't needed?
eakuefner
2014/08/15 22:47:31
Ack. Fills the column better though.
| |
| 21 'json', 'none') | 21 'none') |
| 22 | 22 |
| 23 | 23 |
| 24 def AddResultsOptions(parser): | 24 def AddResultsOptions(parser): |
| 25 group = optparse.OptionGroup(parser, 'Results options') | 25 group = optparse.OptionGroup(parser, 'Results options') |
| 26 group.add_option('--output-format', | 26 group.add_option('--output-format', |
| 27 default=_OUTPUT_FORMAT_CHOICES[0], | 27 default=_OUTPUT_FORMAT_CHOICES[0], |
| 28 choices=_OUTPUT_FORMAT_CHOICES, | 28 choices=_OUTPUT_FORMAT_CHOICES, |
| 29 help='Output format. Defaults to "%%default". ' | 29 help='Output format. Defaults to "%%default". ' |
| 30 'Can be %s.' % ', '.join(_OUTPUT_FORMAT_CHOICES)) | 30 'Can be %s.' % ', '.join(_OUTPUT_FORMAT_CHOICES)) |
| 31 group.add_option('-o', '--output', | 31 group.add_option('-o', '--output', |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 % (options.output_format, | 108 % (options.output_format, |
| 109 ', '.join(_OUTPUT_FORMAT_CHOICES))) | 109 ', '.join(_OUTPUT_FORMAT_CHOICES))) |
| 110 | 110 |
| 111 if options.suppress_gtest_report: | 111 if options.suppress_gtest_report: |
| 112 reporter = progress_reporter.ProgressReporter() | 112 reporter = progress_reporter.ProgressReporter() |
| 113 else: | 113 else: |
| 114 reporter = gtest_progress_reporter.GTestProgressReporter( | 114 reporter = gtest_progress_reporter.GTestProgressReporter( |
| 115 sys.stdout, output_skipped_tests_summary=output_skipped_tests_summary) | 115 sys.stdout, output_skipped_tests_summary=output_skipped_tests_summary) |
| 116 return page_test_results.PageTestResults( | 116 return page_test_results.PageTestResults( |
| 117 output_formatters=output_formatters, progress_reporter=reporter) | 117 output_formatters=output_formatters, progress_reporter=reporter) |
| OLD | NEW |