am 48ee3b67: (-s ours) am 31805e60: Fix warning in modf() precision test code am...
[platform/upstream/VK-GL-CTS.git] / scripts / build_android_mustpass.py
1 # -*- coding: utf-8 -*-
2
3 #-------------------------------------------------------------------------
4 # drawElements Quality Program utilities
5 # --------------------------------------
6 #
7 # Copyright 2015 The Android Open Source Project
8 #
9 # Licensed under the Apache License, Version 2.0 (the "License");
10 # you may not use this file except in compliance with the License.
11 # You may obtain a copy of the License at
12 #
13 #      http://www.apache.org/licenses/LICENSE-2.0
14 #
15 # Unless required by applicable law or agreed to in writing, software
16 # distributed under the License is distributed on an "AS IS" BASIS,
17 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 # See the License for the specific language governing permissions and
19 # limitations under the License.
20 #
21 #-------------------------------------------------------------------------
22
23 from build.common import *
24 from build.config import ANY_GENERATOR
25 from build.build import build
26 from build_caselists import Module, getBuildConfig, genCaseList, getCaseListPath, DEFAULT_BUILD_DIR, DEFAULT_TARGET
27 from fnmatch import fnmatch
28 from copy import copy
29
30 import xml.etree.cElementTree as ElementTree
31 import xml.dom.minidom as minidom
32
33 CTS_DATA_DIR    = os.path.join(DEQP_DIR, "android", "cts")
34 APK_NAME                = "com.drawelements.deqp.apk"
35
36 COPYRIGHT_DECLARATION = """
37      Copyright (C) 2015 The Android Open Source Project
38
39      Licensed under the Apache License, Version 2.0 (the "License");
40      you may not use this file except in compliance with the License.
41      You may obtain a copy of the License at
42
43           http://www.apache.org/licenses/LICENSE-2.0
44
45      Unless required by applicable law or agreed to in writing, software
46      distributed under the License is distributed on an "AS IS" BASIS,
47      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
48      See the License for the specific language governing permissions and
49      limitations under the License.
50      """
51
52 GENERATED_FILE_WARNING = """
53      This file has been automatically generated. Edit with caution.
54      """
55
56 class Configuration:
57         def __init__ (self, name, glconfig, rotation, surfacetype, filters):
58                 self.name                       = name
59                 self.glconfig           = glconfig
60                 self.rotation           = rotation
61                 self.surfacetype        = surfacetype
62                 self.filters            = filters
63
64 class Package:
65         def __init__ (self, module, configurations):
66                 self.module                     = module
67                 self.configurations     = configurations
68
69 class Mustpass:
70         def __init__ (self, version, packages):
71                 self.version    = version
72                 self.packages   = packages
73
74 class Filter:
75         TYPE_INCLUDE = 0
76         TYPE_EXCLUDE = 1
77
78         def __init__ (self, type, filename):
79                 self.type               = type
80                 self.filename   = filename
81
82 class TestRoot:
83         def __init__ (self):
84                 self.children   = []
85
86 class TestGroup:
87         def __init__ (self, name):
88                 self.name               = name
89                 self.children   = []
90
91 class TestCase:
92         def __init__ (self, name):
93                 self.name                       = name
94                 self.configurations     = []
95
96 class GLESVersion:
97         def __init__(self, major, minor):
98                 self.major = major
99                 self.minor = minor
100
101         def encode (self):
102                 return (self.major << 16) | (self.minor)
103
104 def getModuleGLESVersion (module):
105         versions = {
106                 'dEQP-EGL':             GLESVersion(2,0),
107                 'dEQP-GLES2':   GLESVersion(2,0),
108                 'dEQP-GLES3':   GLESVersion(3,0),
109                 'dEQP-GLES31':  GLESVersion(3,1)
110         }
111         return versions[module.name]
112
113 def getSrcDir (mustpass):
114         return os.path.join(CTS_DATA_DIR, mustpass.version, "src")
115
116 def getTmpDir (mustpass):
117         return os.path.join(CTS_DATA_DIR, mustpass.version, "tmp")
118
119 def getModuleShorthand (module):
120         assert module.name[:5] == "dEQP-"
121         return module.name[5:].lower()
122
123 def getCaseListFileName (package, configuration):
124         return "%s-%s.txt" % (getModuleShorthand(package.module), configuration.name)
125
126 def getDstCaseListPath (mustpass, package, configuration):
127         return os.path.join(CTS_DATA_DIR, mustpass.version, getCaseListFileName(package, configuration))
128
129 def getCTSPackageName (package):
130         return "com.drawelements.deqp." + getModuleShorthand(package.module)
131
132 def getCommandLine (config):
133         return "--deqp-gl-config-name=%s --deqp-screen-rotation=%s --deqp-surface-type=%s --deqp-watchdog=enable" % (config.glconfig, config.rotation, config.surfacetype)
134
135 def readCaseList (filename):
136         cases = []
137         with open(filename, 'rb') as f:
138                 for line in f:
139                         if line[:6] == "TEST: ":
140                                 cases.append(line[6:].strip())
141         return cases
142
143 def getCaseList (buildCfg, generator, module):
144         build(buildCfg, generator, [module.binName])
145         genCaseList(buildCfg, generator, module, "txt")
146         return readCaseList(getCaseListPath(buildCfg, module, "txt"))
147
148 def readPatternList (filename):
149         ptrns = []
150         with open(filename, 'rb') as f:
151                 for line in f:
152                         line = line.strip()
153                         if len(line) > 0 and line[0] != '#':
154                                 ptrns.append(line)
155         return ptrns
156
157 def applyPatterns (caseList, patterns, filename, op):
158         matched                 = set()
159         errors                  = []
160         curList                 = copy(caseList)
161         trivialPtrns    = [p for p in patterns if p.find('*') < 0]
162         regularPtrns    = [p for p in patterns if p.find('*') >= 0]
163
164         # Apply trivial (just case paths)
165         allCasesSet             = set(caseList)
166         for path in trivialPtrns:
167                 if path in allCasesSet:
168                         if path in matched:
169                                 errors.append((path, "Same case specified more than once"))
170                         matched.add(path)
171                 else:
172                         errors.append((path, "Test case not found"))
173
174         curList = [c for c in curList if c not in matched]
175
176         for pattern in regularPtrns:
177                 matchedThisPtrn = set()
178
179                 for case in curList:
180                         if fnmatch(case, pattern):
181                                 matchedThisPtrn.add(case)
182
183                 if len(matchedThisPtrn) == 0:
184                         errors.append((pattern, "Pattern didn't match any cases"))
185
186                 matched = matched | matchedThisPtrn
187                 curList = [c for c in curList if c not in matched]
188
189         for pattern, reason in errors:
190                 print "ERROR: %s: %s" % (reason, pattern)
191
192         if len(errors) > 0:
193                 die("Found %s invalid patterns while processing file %s" % (len(errors), filename))
194
195         return [c for c in caseList if op(c in matched)]
196
197 def applyInclude (caseList, patterns, filename):
198         return applyPatterns(caseList, patterns, filename, lambda b: b)
199
200 def applyExclude (caseList, patterns, filename):
201         return applyPatterns(caseList, patterns, filename, lambda b: not b)
202
203 def readPatternLists (mustpass):
204         lists = {}
205         for package in mustpass.packages:
206                 for cfg in package.configurations:
207                         for filter in cfg.filters:
208                                 if not filter.filename in lists:
209                                         lists[filter.filename] = readPatternList(os.path.join(getSrcDir(mustpass), filter.filename))
210         return lists
211
212 def applyFilters (caseList, patternLists, filters):
213         res = copy(caseList)
214         for filter in filters:
215                 ptrnList = patternLists[filter.filename]
216                 if filter.type == Filter.TYPE_INCLUDE:
217                         res = applyInclude(res, ptrnList, filter.filename)
218                 else:
219                         assert filter.type == Filter.TYPE_EXCLUDE
220                         res = applyExclude(res, ptrnList, filter.filename)
221         return res
222
223 def appendToHierarchy (root, casePath):
224         def findChild (node, name):
225                 for child in node.children:
226                         if child.name == name:
227                                 return child
228                 return None
229
230         curNode         = root
231         components      = casePath.split('.')
232
233         for component in components[:-1]:
234                 nextNode = findChild(curNode, component)
235                 if not nextNode:
236                         nextNode = TestGroup(component)
237                         curNode.children.append(nextNode)
238                 curNode = nextNode
239
240         if not findChild(curNode, components[-1]):
241                 curNode.children.append(TestCase(components[-1]))
242
243 def buildTestHierachy (caseList):
244         root = TestRoot()
245         for case in caseList:
246                 appendToHierarchy(root, case)
247         return root
248
249 def buildTestCaseMap (root):
250         caseMap = {}
251
252         def recursiveBuild (curNode, prefix):
253                 curPath = prefix + curNode.name
254                 if isinstance(curNode, TestCase):
255                         caseMap[curPath] = curNode
256                 else:
257                         for child in curNode.children:
258                                 recursiveBuild(child, curPath + '.')
259
260         for child in root.children:
261                 recursiveBuild(child, '')
262
263         return caseMap
264
265 def include (filename):
266         return Filter(Filter.TYPE_INCLUDE, filename)
267
268 def exclude (filename):
269         return Filter(Filter.TYPE_EXCLUDE, filename)
270
271 def prettifyXML (doc):
272         doc.insert(0, ElementTree.Comment(COPYRIGHT_DECLARATION))
273         doc.insert(1, ElementTree.Comment(GENERATED_FILE_WARNING))
274         uglyString      = ElementTree.tostring(doc, 'utf-8')
275         reparsed        = minidom.parseString(uglyString)
276         return reparsed.toprettyxml(indent='\t', encoding='utf-8')
277
278 def genCTSPackageXML (package, root):
279         def isLeafGroup (testGroup):
280                 numGroups       = 0
281                 numTests        = 0
282
283                 for child in testGroup.children:
284                         if isinstance(child, TestCase):
285                                 numTests += 1
286                         else:
287                                 numGroups += 1
288
289                 assert numGroups + numTests > 0
290
291                 if numGroups > 0 and numTests > 0:
292                         die("Mixed groups and cases in %s" % testGroup.name)
293
294                 return numGroups == 0
295
296         def makeConfiguration (parentElem, configuration):
297                 return ElementTree.SubElement(parentElem, "TestInstance", glconfig=configuration.glconfig, rotation=configuration.rotation, surfacetype=configuration.surfacetype)
298
299         def makeTestCase (parentElem, testCase):
300                 caseElem = ElementTree.SubElement(parentElem, "Test", name=testCase.name)
301                 for config in testCase.configurations:
302                         makeConfiguration(caseElem, config)
303                 return caseElem
304
305         def makeTestGroup (parentElem, testGroup):
306                 groupElem = ElementTree.SubElement(parentElem, "TestCase" if isLeafGroup(testGroup) else "TestSuite", name=testGroup.name)
307                 for child in testGroup.children:
308                         if isinstance(child, TestCase):
309                                 makeTestCase(groupElem, child)
310                         else:
311                                 makeTestGroup(groupElem, child)
312                 return groupElem
313
314         pkgElem = ElementTree.Element("TestPackage",
315                                                                   name                          = package.module.name,
316                                                                   appPackageName        = getCTSPackageName(package),
317                                                                   testType                      = "deqpTest")
318
319         pkgElem.set("xmlns:deqp", "http://drawelements.com/deqp")
320         pkgElem.set("deqp:glesVersion", str(getModuleGLESVersion(package.module).encode()))
321
322         for child in root.children:
323                 makeTestGroup(pkgElem, child)
324
325         return pkgElem
326
327 def genSpecXML (mustpass):
328         mustpassElem = ElementTree.Element("Mustpass", version = mustpass.version)
329
330         for package in mustpass.packages:
331                 packageElem = ElementTree.SubElement(mustpassElem, "TestPackage", name = package.module.name)
332
333                 for config in package.configurations:
334                         configElem = ElementTree.SubElement(packageElem, "Configuration",
335                                                                                                 name                    = config.name,
336                                                                                                 caseListFile    = getCaseListFileName(package, config),
337                                                                                                 commandLine             = getCommandLine(config))
338
339         return mustpassElem
340
341 def addOptionElement (parent, optionName, optionValue):
342         ElementTree.SubElement(parent, "option", name=optionName, value=optionValue)
343
344 def genAndroidTestXml (mustpass):
345         INSTALLER_CLASS = "com.android.compatibility.common.tradefed.targetprep.ApkInstaller"
346         RUNNER_CLASS = "com.drawelements.deqp.runner.DeqpTestRunner"
347         configElement = ElementTree.Element("configuration")
348         preparerElement = ElementTree.SubElement(configElement, "target_preparer")
349         preparerElement.set("class", INSTALLER_CLASS)
350         addOptionElement(preparerElement, "cleanup-apks", "true")
351         addOptionElement(preparerElement, "test-file-name", APK_NAME)
352
353         for package in mustpass.packages:
354                 for config in package.configurations:
355                         testElement = ElementTree.SubElement(configElement, "test")
356                         testElement.set("class", RUNNER_CLASS)
357                         addOptionElement(testElement, "deqp-package", package.module.name)
358                         addOptionElement(testElement, "deqp-caselist-file", getCaseListFileName(package,config))
359                         # \todo [2015-10-16 kalle]: Replace with just command line? - requires simplifications in the runner/tests as well.
360                         addOptionElement(testElement, "deqp-gl-config-name", config.glconfig)
361                         addOptionElement(testElement, "deqp-surface-type", config.surfacetype)
362                         addOptionElement(testElement, "deqp-screen-rotation", config.rotation)
363
364         return configElement
365
366
367 def genMustpass (mustpass, moduleCaseLists):
368         print "Generating mustpass '%s'" % mustpass.version
369
370         patternLists = readPatternLists(mustpass)
371
372         for package in mustpass.packages:
373                 allCasesInPkg           = moduleCaseLists[package.module]
374                 matchingByConfig        = {}
375                 allMatchingSet          = set()
376
377                 for config in package.configurations:
378                         filtered        = applyFilters(allCasesInPkg, patternLists, config.filters)
379                         dstFile         = getDstCaseListPath(mustpass, package, config)
380
381                         print "  Writing deqp caselist: " + dstFile
382                         writeFile(dstFile, "\n".join(filtered) + "\n")
383
384                         matchingByConfig[config]        = filtered
385                         allMatchingSet                          = allMatchingSet | set(filtered)
386
387                 allMatchingCases        = [c for c in allCasesInPkg if c in allMatchingSet] # To preserve ordering
388                 root                            = buildTestHierachy(allMatchingCases)
389                 testCaseMap                     = buildTestCaseMap(root)
390
391                 for config in package.configurations:
392                         for case in matchingByConfig[config]:
393                                 testCaseMap[case].configurations.append(config)
394
395                 # NOTE: CTS v2 does not need package XML files. Remove when transition is complete.
396                 packageXml      = genCTSPackageXML(package, root)
397                 xmlFilename     = os.path.join(CTS_DATA_DIR, mustpass.version, getCTSPackageName(package) + ".xml")
398
399                 print "  Writing CTS caselist: " + xmlFilename
400                 writeFile(xmlFilename, prettifyXML(packageXml))
401
402         specXML                 = genSpecXML(mustpass)
403         specFilename    = os.path.join(CTS_DATA_DIR, mustpass.version, "mustpass.xml")
404
405         print "  Writing spec: " + specFilename
406         writeFile(specFilename, prettifyXML(specXML))
407
408         # TODO: Which is the best selector mechanism?
409         if (mustpass.version == "mnc"):
410                 androidTestXML          = genAndroidTestXml(mustpass)
411                 androidTestFilename     = os.path.join(CTS_DATA_DIR, "AndroidTest.xml")
412
413                 print "  Writing AndroidTest.xml: " + androidTestFilename
414                 writeFile(androidTestFilename, prettifyXML(androidTestXML))
415
416         print "Done!"
417
418 def genMustpassLists (mustpassLists, generator, buildCfg):
419         moduleCaseLists = {}
420
421         # Getting case lists involves invoking build, so we want to cache the results
422         for mustpass in mustpassLists:
423                 for package in mustpass.packages:
424                         if not package.module in moduleCaseLists:
425                                 moduleCaseLists[package.module] = getCaseList(buildCfg, generator, package.module)
426
427         for mustpass in mustpassLists:
428                 genMustpass(mustpass, moduleCaseLists)
429
430 EGL_MODULE                                              = Module(name = "dEQP-EGL", dirName = "egl", binName = "deqp-egl")
431 GLES2_MODULE                                    = Module(name = "dEQP-GLES2", dirName = "gles2", binName = "deqp-gles2")
432 GLES3_MODULE                                    = Module(name = "dEQP-GLES3", dirName = "gles3", binName = "deqp-gles3")
433 GLES31_MODULE                                   = Module(name = "dEQP-GLES31", dirName = "gles31", binName = "deqp-gles31")
434
435 # Lollipop
436
437 LMP_GLES3_PKG                                   = Package(module = GLES3_MODULE, configurations = [
438                 Configuration(name                      = "master",
439                                           glconfig              = "rgba8888d24s8ms0",
440                                           rotation              = "unspecified",
441                                           surfacetype   = "window",
442                                           filters               = [include("es30-lmp.txt")]),
443         ])
444 LMP_GLES31_PKG                                  = Package(module = GLES31_MODULE, configurations = [
445                 Configuration(name                      = "master",
446                                           glconfig              = "rgba8888d24s8ms0",
447                                           rotation              = "unspecified",
448                                           surfacetype   = "window",
449                                           filters               = [include("es31-lmp.txt")]),
450         ])
451
452 # Lollipop MR1
453
454 LMP_MR1_GLES3_PKG                               = Package(module = GLES3_MODULE, configurations = [
455                 Configuration(name                      = "master",
456                                           glconfig              = "rgba8888d24s8ms0",
457                                           rotation              = "unspecified",
458                                           surfacetype   = "window",
459                                           filters               = [include("es30-lmp-mr1.txt")]),
460         ])
461 LMP_MR1_GLES31_PKG                              = Package(module = GLES31_MODULE, configurations = [
462                 Configuration(name                      = "master",
463                                           glconfig              = "rgba8888d24s8ms0",
464                                           rotation              = "unspecified",
465                                           surfacetype   = "window",
466                                           filters               = [include("es31-lmp-mr1.txt")]),
467         ])
468
469 # Marshmallow
470
471 MNC_EGL_PKG                                             = Package(module = EGL_MODULE, configurations = [
472                 # Master
473                 Configuration(name                      = "master",
474                                           glconfig              = "rgba8888d24s8ms0",
475                                           rotation              = "unspecified",
476                                           surfacetype   = "window",
477                                           filters               = [include("egl-master.txt")]),
478         ])
479 MNC_GLES2_PKG                                   = Package(module = GLES2_MODULE, configurations = [
480                 # Master
481                 Configuration(name                      = "master",
482                                           glconfig              = "rgba8888d24s8ms0",
483                                           rotation              = "unspecified",
484                                           surfacetype   = "window",
485                                           filters               = [include("gles2-master.txt")]),
486         ])
487 MNC_GLES3_PKG                                   = Package(module = GLES3_MODULE, configurations = [
488                 # Master
489                 Configuration(name                      = "master",
490                                           glconfig              = "rgba8888d24s8ms0",
491                                           rotation              = "unspecified",
492                                           surfacetype   = "window",
493                                           filters               = [include("gles3-master.txt")]),
494                 # Rotations
495                 Configuration(name                      = "rotate-portrait",
496                                           glconfig              = "rgba8888d24s8ms0",
497                                           rotation              = "0",
498                                           surfacetype   = "window",
499                                           filters               = [include("gles3-master.txt"), include("gles3-rotation.txt")]),
500                 Configuration(name                      = "rotate-landscape",
501                                           glconfig              = "rgba8888d24s8ms0",
502                                           rotation              = "90",
503                                           surfacetype   = "window",
504                                           filters               = [include("gles3-master.txt"), include("gles3-rotation.txt")]),
505                 Configuration(name                      = "rotate-reverse-portrait",
506                                           glconfig              = "rgba8888d24s8ms0",
507                                           rotation              = "180",
508                                           surfacetype   = "window",
509                                           filters               = [include("gles3-master.txt"), include("gles3-rotation.txt")]),
510                 Configuration(name                      = "rotate-reverse-landscape",
511                                           glconfig              = "rgba8888d24s8ms0",
512                                           rotation              = "270",
513                                           surfacetype   = "window",
514                                           filters               = [include("gles3-master.txt"), include("gles3-rotation.txt")]),
515
516                 # MSAA
517                 Configuration(name                      = "multisample",
518                                           glconfig              = "rgba8888d24s8ms4",
519                                           rotation              = "unspecified",
520                                           surfacetype   = "window",
521                                           filters               = [include("gles3-master.txt"),
522                                                                            include("gles3-multisample.txt"),
523                                                                            exclude("gles3-multisample-issues.txt")]),
524
525                 # Pixel format
526                 Configuration(name                      = "565-no-depth-no-stencil",
527                                           glconfig              = "rgb565d0s0ms0",
528                                           rotation              = "unspecified",
529                                           surfacetype   = "window",
530                                           filters               = [include("gles3-master.txt"),
531                                                                            include("gles3-pixelformat.txt"),
532                                                                            exclude("gles3-pixelformat-issues.txt")]),
533         ])
534 MNC_GLES31_PKG                                  = Package(module = GLES31_MODULE, configurations = [
535                 # Master
536                 Configuration(name                      = "master",
537                                           glconfig              = "rgba8888d24s8ms0",
538                                           rotation              = "unspecified",
539                                           surfacetype   = "window",
540                                           filters               = [include("gles31-master.txt")]),
541
542                 # Rotations
543                 Configuration(name                      = "rotate-portrait",
544                                           glconfig              = "rgba8888d24s8ms0",
545                                           rotation              = "0",
546                                           surfacetype   = "window",
547                                           filters               = [include("gles31-master.txt"), include("gles31-rotation.txt")]),
548                 Configuration(name                      = "rotate-landscape",
549                                           glconfig              = "rgba8888d24s8ms0",
550                                           rotation              = "90",
551                                           surfacetype   = "window",
552                                           filters               = [include("gles31-master.txt"), include("gles31-rotation.txt")]),
553                 Configuration(name                      = "rotate-reverse-portrait",
554                                           glconfig              = "rgba8888d24s8ms0",
555                                           rotation              = "180",
556                                           surfacetype   = "window",
557                                           filters               = [include("gles31-master.txt"), include("gles31-rotation.txt")]),
558                 Configuration(name                      = "rotate-reverse-landscape",
559                                           glconfig              = "rgba8888d24s8ms0",
560                                           rotation              = "270",
561                                           surfacetype   = "window",
562                                           filters               = [include("gles31-master.txt"), include("gles31-rotation.txt")]),
563
564                 # MSAA
565                 Configuration(name                      = "multisample",
566                                           glconfig              = "rgba8888d24s8ms4",
567                                           rotation              = "unspecified",
568                                           surfacetype   = "window",
569                                           filters               = [include("gles31-master.txt"), include("gles31-multisample.txt")]),
570
571                 # Pixel format
572                 Configuration(name                      = "565-no-depth-no-stencil",
573                                           glconfig              = "rgb565d0s0ms0",
574                                           rotation              = "unspecified",
575                                           surfacetype   = "window",
576                                           filters               = [include("gles31-master.txt"), include("gles31-pixelformat.txt")]),
577         ])
578
579 # Master
580
581 MASTER_EGL_COMMON_FILTERS               = [include("egl-master.txt")]
582 MASTER_EGL_PKG                                  = Package(module = EGL_MODULE, configurations = [
583                 # Master
584                 Configuration(name                      = "master",
585                                           glconfig              = "rgba8888d24s8ms0",
586                                           rotation              = "unspecified",
587                                           surfacetype   = "window",
588                                           filters               = MASTER_EGL_COMMON_FILTERS),
589         ])
590
591 MASTER_GLES2_COMMON_FILTERS             = [
592                 include("gles2-master.txt"),
593                 exclude("gles2-test-issues.txt"),
594                 exclude("gles2-failures.txt")
595         ]
596 MASTER_GLES2_PKG                                = Package(module = GLES2_MODULE, configurations = [
597                 # Master
598                 Configuration(name                      = "master",
599                                           glconfig              = "rgba8888d24s8ms0",
600                                           rotation              = "unspecified",
601                                           surfacetype   = "window",
602                                           filters               = MASTER_GLES2_COMMON_FILTERS),
603         ])
604
605 MASTER_GLES3_COMMON_FILTERS             = [
606                 include("gles3-master.txt"),
607                 exclude("gles3-hw-issues.txt"),
608                 exclude("gles3-driver-issues.txt"),
609                 exclude("gles3-test-issues.txt"),
610                 exclude("gles3-spec-issues.txt")
611         ]
612 MASTER_GLES3_PKG                                = Package(module = GLES3_MODULE, configurations = [
613                 # Master
614                 Configuration(name                      = "master",
615                                           glconfig              = "rgba8888d24s8ms0",
616                                           rotation              = "unspecified",
617                                           surfacetype   = "window",
618                                           filters               = MASTER_GLES3_COMMON_FILTERS),
619                 # Rotations
620                 Configuration(name                      = "rotate-portrait",
621                                           glconfig              = "rgba8888d24s8ms0",
622                                           rotation              = "0",
623                                           surfacetype   = "window",
624                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")]),
625                 Configuration(name                      = "rotate-landscape",
626                                           glconfig              = "rgba8888d24s8ms0",
627                                           rotation              = "90",
628                                           surfacetype   = "window",
629                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")]),
630                 Configuration(name                      = "rotate-reverse-portrait",
631                                           glconfig              = "rgba8888d24s8ms0",
632                                           rotation              = "180",
633                                           surfacetype   = "window",
634                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")]),
635                 Configuration(name                      = "rotate-reverse-landscape",
636                                           glconfig              = "rgba8888d24s8ms0",
637                                           rotation              = "270",
638                                           surfacetype   = "window",
639                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-rotation.txt")]),
640
641                 # MSAA
642                 Configuration(name                      = "multisample",
643                                           glconfig              = "rgba8888d24s8ms4",
644                                           rotation              = "unspecified",
645                                           surfacetype   = "window",
646                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-multisample.txt"),
647                                                                                                                                          exclude("gles3-multisample-issues.txt")]),
648
649                 # Pixel format
650                 Configuration(name                      = "565-no-depth-no-stencil",
651                                           glconfig              = "rgb565d0s0ms0",
652                                           rotation              = "unspecified",
653                                           surfacetype   = "window",
654                                           filters               = MASTER_GLES3_COMMON_FILTERS + [include("gles3-pixelformat.txt"),
655                                                                                                                                          exclude("gles3-pixelformat-issues.txt")]),
656         ])
657
658 MASTER_GLES31_COMMON_FILTERS    = [
659                 include("gles31-master.txt"),
660                 exclude("gles31-hw-issues.txt"),
661                 exclude("gles31-driver-issues.txt"),
662                 exclude("gles31-test-issues.txt"),
663                 exclude("gles31-spec-issues.txt"),
664         ]
665 MASTER_GLES31_PKG                               = Package(module = GLES31_MODULE, configurations = [
666                 # Master
667                 Configuration(name                      = "master",
668                                           glconfig              = "rgba8888d24s8ms0",
669                                           rotation              = "unspecified",
670                                           surfacetype   = "window",
671                                           filters               = MASTER_GLES31_COMMON_FILTERS),
672
673                 # Rotations
674                 Configuration(name                      = "rotate-portrait",
675                                           glconfig              = "rgba8888d24s8ms0",
676                                           rotation              = "0",
677                                           surfacetype   = "window",
678                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")]),
679                 Configuration(name                      = "rotate-landscape",
680                                           glconfig              = "rgba8888d24s8ms0",
681                                           rotation              = "90",
682                                           surfacetype   = "window",
683                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")]),
684                 Configuration(name                      = "rotate-reverse-portrait",
685                                           glconfig              = "rgba8888d24s8ms0",
686                                           rotation              = "180",
687                                           surfacetype   = "window",
688                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")]),
689                 Configuration(name                      = "rotate-reverse-landscape",
690                                           glconfig              = "rgba8888d24s8ms0",
691                                           rotation              = "270",
692                                           surfacetype   = "window",
693                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-rotation.txt")]),
694
695                 # MSAA
696                 Configuration(name                      = "multisample",
697                                           glconfig              = "rgba8888d24s8ms4",
698                                           rotation              = "unspecified",
699                                           surfacetype   = "window",
700                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-multisample.txt")]),
701
702                 # Pixel format
703                 Configuration(name                      = "565-no-depth-no-stencil",
704                                           glconfig              = "rgb565d0s0ms0",
705                                           rotation              = "unspecified",
706                                           surfacetype   = "window",
707                                           filters               = MASTER_GLES31_COMMON_FILTERS + [include("gles31-pixelformat.txt")]),
708         ])
709
710 MUSTPASS_LISTS                          = [
711                 Mustpass(version = "lmp",               packages = [LMP_GLES3_PKG, LMP_GLES31_PKG]),
712                 Mustpass(version = "lmp-mr1",   packages = [LMP_MR1_GLES3_PKG, LMP_MR1_GLES31_PKG]),
713                 Mustpass(version = "mnc",               packages = [MNC_EGL_PKG, MNC_GLES2_PKG, MNC_GLES3_PKG, MNC_GLES31_PKG]),
714                 Mustpass(version = "master",    packages = [MASTER_EGL_PKG, MASTER_GLES2_PKG, MASTER_GLES3_PKG, MASTER_GLES31_PKG])
715         ]
716
717 if __name__ == "__main__":
718         genMustpassLists(MUSTPASS_LISTS, ANY_GENERATOR, getBuildConfig(DEFAULT_BUILD_DIR, DEFAULT_TARGET, "Debug"))