| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import collections | 4 import collections |
| 5 import itertools | 5 import itertools |
| 6 import os | 6 import os |
| 7 import unittest | 7 import unittest |
| 8 | 8 |
| 9 from telemetry.testing import fakes | 9 from telemetry.testing import fakes |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 self.checkConformanceHasNoCollisions(conformance) | 74 self.checkConformanceHasNoCollisions(conformance) |
| 75 | 75 |
| 76 def testWebGL2ExpectationsHaveNoCollisions(self): | 76 def testWebGL2ExpectationsHaveNoCollisions(self): |
| 77 conformance = webgl2_conformance_expectations.\ | 77 conformance = webgl2_conformance_expectations.\ |
| 78 WebGL2ConformanceExpectations(webgl_conformance.conformance_path) | 78 WebGL2ConformanceExpectations(webgl_conformance.conformance_path) |
| 79 | 79 |
| 80 self.checkConformanceHasNoCollisions(conformance) | 80 self.checkConformanceHasNoCollisions(conformance) |
| 81 | 81 |
| 82 def checkConformanceHasNoCollisions(self, conformance): | 82 def checkConformanceHasNoCollisions(self, conformance): |
| 83 self.assertFalse(True) |
| 83 # Checks that no two expectations for the same page can match the | 84 # Checks that no two expectations for the same page can match the |
| 84 # same configuration (wildcards expectations are ok though). | 85 # same configuration (wildcards expectations are ok though). |
| 85 # See webgl2_conformance_expectations.py that contains commented out | 86 # See webgl2_conformance_expectations.py that contains commented out |
| 86 # conflicting expectations that can be used to test this function. | 87 # conflicting expectations that can be used to test this function. |
| 87 expectations = conformance.GetAllNonWildcardExpectations() | 88 expectations = conformance.GetAllNonWildcardExpectations() |
| 88 | 89 |
| 89 # Extract the conditions of the expectations as a tuple of sets, one | 90 # Extract the conditions of the expectations as a tuple of sets, one |
| 90 # set for each aspect (OS, GPU...) of the expectations. | 91 # set for each aspect (OS, GPU...) of the expectations. |
| 91 conditions_by_pattern = dict() | 92 conditions_by_pattern = dict() |
| 92 for e in expectations: | 93 for e in expectations: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 len(c1.vendors.intersection(c2.vendors)) != 0 or \ | 139 len(c1.vendors.intersection(c2.vendors)) != 0 or \ |
| 139 len(c1.devices.intersection(c2.devices)) != 0 or \ | 140 len(c1.devices.intersection(c2.devices)) != 0 or \ |
| 140 any([vendor in c1.vendors for (vendor, _) in c2.devices]) or \ | 141 any([vendor in c1.vendors for (vendor, _) in c2.devices]) or \ |
| 141 any([vendor in c2.vendors for (vendor, _) in c1.devices]) | 142 any([vendor in c2.vendors for (vendor, _) in c1.devices]) |
| 142 | 143 |
| 143 conflicts = non_gpu_conflicts and gpu_conflicts | 144 conflicts = non_gpu_conflicts and gpu_conflicts |
| 144 | 145 |
| 145 if conflicts: | 146 if conflicts: |
| 146 print "WARNING: Found a conflict for", pattern | 147 print "WARNING: Found a conflict for", pattern |
| 147 self.assertEquals(conflicts, False) | 148 self.assertEquals(conflicts, False) |
| OLD | NEW |