| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 import csv | 5 import csv |
| 6 import logging | 6 import logging |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from chrome_remote_control import browser_finder | 10 from chrome_remote_control import browser_finder |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 results = multi_page_benchmark.CsvBenchmarkResults(csv.writer(sys.stdout)) | 65 results = multi_page_benchmark.CsvBenchmarkResults(csv.writer(sys.stdout)) |
| 66 with page_runner.PageRunner(ps) as runner: | 66 with page_runner.PageRunner(ps) as runner: |
| 67 runner.Run(options, possible_browser, benchmark, results) | 67 runner.Run(options, possible_browser, benchmark, results) |
| 68 # When using an exact executable, assume it is a reference build for the | 68 # When using an exact executable, assume it is a reference build for the |
| 69 # purpose of outputting the perf results. | 69 # purpose of outputting the perf results. |
| 70 results.PrintSummary(options.browser_executable and '_ref' or '') | 70 results.PrintSummary(options.browser_executable and '_ref' or '') |
| 71 | 71 |
| 72 if len(results.page_failures): | 72 if len(results.page_failures): |
| 73 logging.warning('Failed pages: %s', '\n'.join( | 73 logging.warning('Failed pages: %s', '\n'.join( |
| 74 [failure['page'].url for failure in results.page_failures])) | 74 [failure['page'].url for failure in results.page_failures])) |
| 75 return max(255, len(results.page_failures)) | 75 return min(255, len(results.page_failures)) |
| OLD | NEW |