10 BaseTest.__init__(self)
17 Parse a QMTest XML test description (.qmt file) to initialize the test 20 log = logging.getLogger(
'QMTest.XMLParser')
21 import xml.etree.ElementTree
as ET
22 log.debug(
'parsing %s', path)
27 for child
in tree.getroot():
28 name = child.attrib[
'name']
29 if hasattr(self, name):
30 log.debug(
'setting %s', name)
32 if name
in (
'args',
'unsupported_platforms'):
33 setattr(self, name, [el.text
34 for el
in value.findall(
'text')])
35 elif name ==
'environment':
36 setattr(self, name, dict(el.text.split(
'=', 1)
37 for el
in value.findall(
'text')))
41 if value.tag ==
'integer':
43 setattr(self, name, data)
48 class CallWrapper(object):
50 Small wrapper class to dynamically bind some default arguments 53 def __init__(self, callable, extra_args = {}):
57 from inspect
import getargspec
63 def __call__(self, *args, **kwargs):
71 if a
not in positional
and a
not in kwargs:
78 exported_symbols = {
"self": self,
83 "reference": stdout_ref,
84 "error_reference": stderr_ref,
90 "validateWithReference":
101 "checkTTreesSummaries":
106 "checkHistosSummaries":
113 exec self.
validator in globals(), exported_symbols
114 return result, self.
causes 116 return super(QMTTest, self).
ValidateOutput(stdout, stderr, result)
def XMLParser(self, path)
def validateWithReference(self, stdout=None, stderr=None, result=None, causes=None, preproc=None)
def ValidateOutput(self, stdout, stderr, result)
def __init__(self, path=None)
def _expandReferenceFileName(self, reffile)
def findReferenceBlock(self, reference=None, stdout=None, result=None, causes=None, signature_offset=0, signature=None, id=None)
def CheckHistosSummaries(self, stdout=None, result=None, causes=None, dict=None, ignore=None)
constexpr void apply(const Fun &, Container &, Args...)
def CheckTTreesSummaries(self, stdout=None, result=None, causes=None, trees_dict=None, ignore=r"Basket|.*size|Compression")