from fnmatch import fnmatch
from copy import copy
+import argparse
import xml.etree.cElementTree as ElementTree
import xml.dom.minidom as minidom
self.copyright = copyright
class Configuration:
- def __init__ (self, name, filters, glconfig = None, rotation = None, surfacetype = None, runtime = None):
- self.name = name
- self.glconfig = glconfig
- self.rotation = rotation
- self.surfacetype = surfacetype
- self.filters = filters
- self.expectedRuntime = runtime
+ def __init__ (self, name, filters, glconfig = None, rotation = None, surfacetype = None, required = False, runtime = None):
+ self.name = name
+ self.glconfig = glconfig
+ self.rotation = rotation
+ self.surfacetype = surfacetype
+ self.required = required
+ self.filters = filters
+ self.expectedRuntime = runtime
class Package:
def __init__ (self, module, configurations):
RUNNER_CLASS = "com.drawelements.deqp.runner.DeqpTestRunner"
configElement = ElementTree.Element("configuration")
+ # add in metadata option for component name
+ ElementTree.SubElement(configElement, "option", name="config-descriptor:metadata", key="component", value="deqp")
+
for package in mustpass.packages:
for config in package.configurations:
testElement = ElementTree.SubElement(configElement, "test")
if config.expectedRuntime != None:
addOptionElement(testElement, "runtime-hint", config.expectedRuntime)
+ if config.required:
+ addOptionElement(testElement, "deqp-config-required", "true")
+
insertXMLHeaders(mustpass, configElement)
return configElement
for mustpass in mustpassLists:
genMustpass(mustpass, moduleCaseLists)
+
+def parseCmdLineArgs ():
+ parser = argparse.ArgumentParser(description = "Build Android CTS mustpass",
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.add_argument("-b",
+ "--build-dir",
+ dest="buildDir",
+ default=DEFAULT_BUILD_DIR,
+ help="Temporary build directory")
+ parser.add_argument("-t",
+ "--build-type",
+ dest="buildType",
+ default="Debug",
+ help="Build type")
+ parser.add_argument("-c",
+ "--deqp-target",
+ dest="targetName",
+ default=DEFAULT_TARGET,
+ help="dEQP build target")
+ return parser.parse_args()
+
+def parseBuildConfigFromCmdLineArgs ():
+ args = parseCmdLineArgs()
+ return getBuildConfig(args.buildDir, args.targetName, args.buildType)