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 |
(...skipping 29 matching lines...) Expand all Loading... | |
40 expectation["color"][2]) | 40 expectation["color"][2]) |
41 if not actual_color.IsEqual(expected_color, expectation["tolerance"]): | 41 if not actual_color.IsEqual(expected_color, expectation["tolerance"]): |
42 raise page_test.Failure('Expected pixel at ' + str(location) + | 42 raise page_test.Failure('Expected pixel at ' + str(location) + |
43 ' to be ' + | 43 ' to be ' + |
44 str(expectation["color"]) + " but got [" + | 44 str(expectation["color"]) + " but got [" + |
45 str(actual_color.r) + ", " + | 45 str(actual_color.r) + ", " + |
46 str(actual_color.g) + ", " + | 46 str(actual_color.g) + ", " + |
47 str(actual_color.b) + "]") | 47 str(actual_color.b) + "]") |
48 | 48 |
49 class ValidatorBase(page_test.PageTest): | 49 class ValidatorBase(page_test.PageTest): |
50 options = {'output_format': 'gtest'} | |
Ken Russell (switch to Gerrit)
2014/07/24 01:24:33
Where is it documented that a class variable named
| |
51 | |
50 def __init__(self): | 52 def __init__(self): |
51 super(ValidatorBase, self).__init__() | 53 super(ValidatorBase, self).__init__() |
52 # Parameters for cloud storage reference images. | 54 # Parameters for cloud storage reference images. |
53 self.vendor_id = None | 55 self.vendor_id = None |
54 self.device_id = None | 56 self.device_id = None |
55 self.vendor_string = None | 57 self.vendor_string = None |
56 self.device_string = None | 58 self.device_string = None |
57 self.msaa = False | 59 self.msaa = False |
58 | 60 |
59 ### | 61 ### |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 default='') | 246 default='') |
245 group.add_option('--test-machine-name', | 247 group.add_option('--test-machine-name', |
246 help='Name of the test machine. Specifying this argument causes this ' | 248 help='Name of the test machine. Specifying this argument causes this ' |
247 'script to upload failure images and diffs to cloud storage directly, ' | 249 'script to upload failure images and diffs to cloud storage directly, ' |
248 'instead of relying on the archive_gpu_pixel_test_results.py script.', | 250 'instead of relying on the archive_gpu_pixel_test_results.py script.', |
249 default='') | 251 default='') |
250 group.add_option('--generated-dir', | 252 group.add_option('--generated-dir', |
251 help='Overrides the default on-disk location for generated test images ' | 253 help='Overrides the default on-disk location for generated test images ' |
252 '(only used for local testing without a cloud storage account)', | 254 '(only used for local testing without a cloud storage account)', |
253 default=default_generated_data_dir) | 255 default=default_generated_data_dir) |
OLD | NEW |