Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: content/test/gpu/gpu_tests/cloud_storage_test_base.py

Issue 337603005: Rename telemetry.test.Test to telemetry.benchmark.Benchmark. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 telemetry import test 12 from telemetry import benchmark
13 from telemetry.core import bitmap 13 from telemetry.core import bitmap
14 from telemetry.page import cloud_storage 14 from telemetry.page import cloud_storage
15 from telemetry.page import page_test 15 from telemetry.page import page_test
16 16
17 test_data_dir = os.path.abspath(os.path.join( 17 test_data_dir = os.path.abspath(os.path.join(
18 os.path.dirname(__file__), '..', '..', 'data', 'gpu')) 18 os.path.dirname(__file__), '..', '..', 'data', 'gpu'))
19 19
20 default_generated_data_dir = os.path.join(test_data_dir, 'generated') 20 default_generated_data_dir = os.path.join(test_data_dir, 'generated')
21 21
22 error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests' 22 error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests'
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 except page_test.Failure: 208 except page_test.Failure:
209 image_name = self._UrlToImageName(url) 209 image_name = self._UrlToImageName(url)
210 if self.options.test_machine_name: 210 if self.options.test_machine_name:
211 self._UploadErrorImagesToCloudStorage(image_name, screenshot, None) 211 self._UploadErrorImagesToCloudStorage(image_name, screenshot, None)
212 else: 212 else:
213 self._WriteErrorImages(self.options.generated_dir, image_name, 213 self._WriteErrorImages(self.options.generated_dir, image_name,
214 screenshot, None) 214 screenshot, None)
215 raise 215 raise
216 216
217 217
218 class TestBase(test.Test): 218 class TestBase(benchmark.Benchmark):
219 @classmethod 219 @classmethod
220 def AddTestCommandLineArgs(cls, group): 220 def AddTestCommandLineArgs(cls, group):
221 group.add_option('--build-revision', 221 group.add_option('--build-revision',
222 help='Chrome revision being tested.', 222 help='Chrome revision being tested.',
223 default="unknownrev") 223 default="unknownrev")
224 group.add_option('--upload-refimg-to-cloud-storage', 224 group.add_option('--upload-refimg-to-cloud-storage',
225 dest='upload_refimg_to_cloud_storage', 225 dest='upload_refimg_to_cloud_storage',
226 action='store_true', default=False, 226 action='store_true', default=False,
227 help='Upload resulting images to cloud storage as reference images') 227 help='Upload resulting images to cloud storage as reference images')
228 group.add_option('--download-refimg-from-cloud-storage', 228 group.add_option('--download-refimg-from-cloud-storage',
(...skipping 14 matching lines...) Expand all
243 default='') 243 default='')
244 group.add_option('--test-machine-name', 244 group.add_option('--test-machine-name',
245 help='Name of the test machine. Specifying this argument causes this ' 245 help='Name of the test machine. Specifying this argument causes this '
246 'script to upload failure images and diffs to cloud storage directly, ' 246 'script to upload failure images and diffs to cloud storage directly, '
247 'instead of relying on the archive_gpu_pixel_test_results.py script.', 247 'instead of relying on the archive_gpu_pixel_test_results.py script.',
248 default='') 248 default='')
249 group.add_option('--generated-dir', 249 group.add_option('--generated-dir',
250 help='Overrides the default on-disk location for generated test images ' 250 help='Overrides the default on-disk location for generated test images '
251 '(only used for local testing without a cloud storage account)', 251 '(only used for local testing without a cloud storage account)',
252 default=default_generated_data_dir) 252 default=default_generated_data_dir)
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/context_lost.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698