Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 which uploads results (reference images, | 5 """Base classes for a test which uploads results (reference images, |
| 6 error images) to cloud storage.""" | 6 error images) to cloud storage.""" |
| 7 | 7 |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 ('disable_multisample_render_to_texture' in | 240 ('disable_multisample_render_to_texture' in |
| 241 system_info.gpu.driver_bug_workarounds)) | 241 system_info.gpu.driver_bug_workarounds)) |
| 242 params.model_name = system_info.model_name | 242 params.model_name = system_info.model_name |
| 243 | 243 |
| 244 @classmethod | 244 @classmethod |
| 245 def _FormatGpuInfo(cls, tab): | 245 def _FormatGpuInfo(cls, tab): |
| 246 cls._ComputeGpuInfo(tab) | 246 cls._ComputeGpuInfo(tab) |
| 247 params = cls._reference_image_parameters | 247 params = cls._reference_image_parameters |
| 248 msaa_string = '_msaa' if params.msaa else '_non_msaa' | 248 msaa_string = '_msaa' if params.msaa else '_non_msaa' |
| 249 if params.vendor_id: | 249 if params.vendor_id: |
| 250 return '%s_%04x_%04x%s' % ( | 250 base_name = '%s_%04x_%04x%s' % ( |
| 251 cls.GetParsedCommandLineOptions().os_type, params.vendor_id, | 251 cls.GetParsedCommandLineOptions().os_type, params.vendor_id, |
| 252 params.device_id, msaa_string) | 252 params.device_id, msaa_string) |
| 253 if str(cls.browser.platform.GetOSVersionName()).lower() == "win10": | |
| 254 # Allow separate baselines for Windows 10 and Windows 7. | |
| 255 base_name = "win10_" + base_name | |
|
Ken Russell (switch to Gerrit)
2017/04/01 01:18:56
Could you add a little more logic above the assign
| |
| 256 return base_name | |
| 253 else: | 257 else: |
| 254 # This is the code path for Android devices. Include the model | 258 # This is the code path for Android devices. Include the model |
| 255 # name (e.g. "Nexus 9") in the GPU string to disambiguate | 259 # name (e.g. "Nexus 9") in the GPU string to disambiguate |
| 256 # multiple devices on the waterfall which might have the same | 260 # multiple devices on the waterfall which might have the same |
| 257 # device string ("NVIDIA Tegra") but different screen | 261 # device string ("NVIDIA Tegra") but different screen |
| 258 # resolutions and device pixel ratios. | 262 # resolutions and device pixel ratios. |
| 259 return '%s_%s_%s_%s%s' % ( | 263 return '%s_%s_%s_%s%s' % ( |
| 260 cls.GetParsedCommandLineOptions().os_type, | 264 cls.GetParsedCommandLineOptions().os_type, |
| 261 params.vendor_string, params.device_string, | 265 params.vendor_string, params.device_string, |
| 262 params.model_name, msaa_string) | 266 params.model_name, msaa_string) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 except Exception: | 357 except Exception: |
| 354 # An exception raised from self.fail() indicates a failure. | 358 # An exception raised from self.fail() indicates a failure. |
| 355 image_name = self._UrlToImageName(url) | 359 image_name = self._UrlToImageName(url) |
| 356 if self.GetParsedCommandLineOptions().test_machine_name: | 360 if self.GetParsedCommandLineOptions().test_machine_name: |
| 357 self._UploadErrorImagesToCloudStorage(image_name, screenshot, None) | 361 self._UploadErrorImagesToCloudStorage(image_name, screenshot, None) |
| 358 else: | 362 else: |
| 359 self._WriteErrorImages( | 363 self._WriteErrorImages( |
| 360 self.GetParsedCommandLineOptions().generated_dir, image_name, | 364 self.GetParsedCommandLineOptions().generated_dir, image_name, |
| 361 screenshot, None) | 365 screenshot, None) |
| 362 raise | 366 raise |
| OLD | NEW |