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

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

Issue 1422613003: Swarm telemetry_gpu_unittests on "Windows Tests", "Mac tests", "Linux tests" and FYI bot Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
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
11 from gpu_tests import fake_win_amd_gpu_info 11 from gpu_tests import fake_win_amd_gpu_info
12 from gpu_tests import gpu_test_base 12 from gpu_tests import gpu_test_base
13 from gpu_tests import path_util 13 from gpu_tests import path_util
14 from gpu_tests import test_expectations 14 from gpu_tests import test_expectations
15 from gpu_tests import webgl_conformance 15 from gpu_tests import webgl_conformance
16 from gpu_tests import webgl_conformance_expectations 16 from gpu_tests import webgl_conformance_expectationz
17 from gpu_tests import webgl2_conformance_expectations 17 from gpu_tests import webgl2_conformance_expectations
18 18
19 class FakeWindowsPlatform(fakes.FakePlatform): 19 class FakeWindowsPlatform(fakes.FakePlatform):
20 @property 20 @property
21 def is_host_platform(self): 21 def is_host_platform(self):
22 return True 22 return True
23 23
24 def GetDeviceTypeName(self): 24 def GetDeviceTypeName(self):
25 return 'Desktop' 25 return 'Desktop'
26 26
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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)
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/gpu_test_base_unittest.py ('k') | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698