| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from gpu_tests import test_expectations | 5 from gpu_tests import test_expectations |
| 6 | 6 |
| 7 ANGLE_CONDITIONS = ['d3d9', 'd3d11', 'opengl', 'no_angle'] | 7 ANGLE_CONDITIONS = ['d3d9', 'd3d11', 'opengl', 'no_angle'] |
| 8 CMD_DECODER_CONDITIONS = ['passthrough', 'no_passthrough'] | 8 CMD_DECODER_CONDITIONS = ['passthrough', 'no_passthrough'] |
| 9 GPU_CONDITIONS = ['amd', 'arm', 'broadcom', 'hisilicon', 'intel', 'imagination', | 9 GPU_CONDITIONS = ['amd', 'arm', 'broadcom', 'hisilicon', 'intel', 'imagination', |
| 10 'nvidia', 'qualcomm', 'vivante'] | 10 'nvidia', 'qualcomm', 'vivante'] |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 elif cl in ANGLE_CONDITIONS: | 69 elif cl in ANGLE_CONDITIONS: |
| 70 self.angle_conditions.append(cl) | 70 self.angle_conditions.append(cl) |
| 71 elif cl in CMD_DECODER_CONDITIONS: | 71 elif cl in CMD_DECODER_CONDITIONS: |
| 72 self.cmd_decoder_conditions.append(cl) | 72 self.cmd_decoder_conditions.append(cl) |
| 73 else: | 73 else: |
| 74 # Delegate to superclass. | 74 # Delegate to superclass. |
| 75 super(GpuExpectation, self).ParseCondition(condition) | 75 super(GpuExpectation, self).ParseCondition(condition) |
| 76 | 76 |
| 77 | 77 |
| 78 class GpuTestExpectations(test_expectations.TestExpectations): | 78 class GpuTestExpectations(test_expectations.TestExpectations): |
| 79 def __init__(self, url_prefixes=None): | 79 def __init__(self, url_prefixes=None, is_asan=False): |
| 80 super(GpuTestExpectations, self).__init__(url_prefixes=url_prefixes) | 80 super(GpuTestExpectations, self).__init__( |
| 81 url_prefixes=url_prefixes, is_asan=is_asan) |
| 81 | 82 |
| 82 def CreateExpectation(self, expectation, pattern, conditions=None, | 83 def CreateExpectation(self, expectation, pattern, conditions=None, |
| 83 bug=None): | 84 bug=None): |
| 84 return GpuExpectation(expectation, pattern, conditions, bug) | 85 return GpuExpectation(expectation, pattern, conditions, bug) |
| 85 | 86 |
| 86 def Flaky(self, pattern, conditions=None, bug=None, max_num_retries=2): | 87 def Flaky(self, pattern, conditions=None, bug=None, max_num_retries=2): |
| 87 self._AddExpectation(GpuExpectation( | 88 self._AddExpectation(GpuExpectation( |
| 88 'flaky', pattern, conditions=conditions, bug=bug, | 89 'flaky', pattern, conditions=conditions, bug=bug, |
| 89 max_num_retries=max_num_retries)) | 90 max_num_retries=max_num_retries)) |
| 90 | 91 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 return 'd3d9' | 157 return 'd3d9' |
| 157 elif 'OpenGL' in gl_renderer: | 158 elif 'OpenGL' in gl_renderer: |
| 158 return 'opengl' | 159 return 'opengl' |
| 159 return 'no_angle' | 160 return 'no_angle' |
| 160 | 161 |
| 161 def _GetCommandDecoder(self, gpu_info): | 162 def _GetCommandDecoder(self, gpu_info): |
| 162 if gpu_info and gpu_info.aux_attributes and \ | 163 if gpu_info and gpu_info.aux_attributes and \ |
| 163 gpu_info.aux_attributes.get('passthrough_cmd_decoder', False): | 164 gpu_info.aux_attributes.get('passthrough_cmd_decoder', False): |
| 164 return 'passthrough' | 165 return 'passthrough' |
| 165 return 'no_passthrough' | 166 return 'no_passthrough' |
| OLD | NEW |