| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """Base classes for a test and validator which upload results | 5 """Base classes for a test and validator which upload results |
| 6 (reference images, error images) to cloud storage.""" | 6 (reference images, error images) to cloud storage.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import tempfile | 10 import tempfile |
| 11 | 11 |
| 12 from catapult_base import cloud_storage |
| 12 from telemetry import benchmark | 13 from telemetry import benchmark |
| 13 from telemetry.image_processing import image_util | 14 from telemetry.image_processing import image_util |
| 14 from telemetry.image_processing import rgba_color | 15 from telemetry.image_processing import rgba_color |
| 15 from telemetry.page import page_test | 16 from telemetry.page import page_test |
| 16 from telemetry.util import cloud_storage | |
| 17 | 17 |
| 18 | 18 |
| 19 test_data_dir = os.path.abspath(os.path.join( | 19 test_data_dir = os.path.abspath(os.path.join( |
| 20 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) | 20 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) |
| 21 | 21 |
| 22 default_generated_data_dir = os.path.join(test_data_dir, 'generated') | 22 default_generated_data_dir = os.path.join(test_data_dir, 'generated') |
| 23 | 23 |
| 24 error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests' | 24 error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests' |
| 25 | 25 |
| 26 def _CompareScreenshotSamples(screenshot, expectations, device_pixel_ratio): | 26 def _CompareScreenshotSamples(screenshot, expectations, device_pixel_ratio): |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 default='') | 252 default='') |
| 253 group.add_option('--test-machine-name', | 253 group.add_option('--test-machine-name', |
| 254 help='Name of the test machine. Specifying this argument causes this ' | 254 help='Name of the test machine. Specifying this argument causes this ' |
| 255 'script to upload failure images and diffs to cloud storage directly, ' | 255 'script to upload failure images and diffs to cloud storage directly, ' |
| 256 'instead of relying on the archive_gpu_pixel_test_results.py script.', | 256 'instead of relying on the archive_gpu_pixel_test_results.py script.', |
| 257 default='') | 257 default='') |
| 258 group.add_option('--generated-dir', | 258 group.add_option('--generated-dir', |
| 259 help='Overrides the default on-disk location for generated test images ' | 259 help='Overrides the default on-disk location for generated test images ' |
| 260 '(only used for local testing without a cloud storage account)', | 260 '(only used for local testing without a cloud storage account)', |
| 261 default=default_generated_data_dir) | 261 default=default_generated_data_dir) |
| OLD | NEW |