11 BaseTest.__init__(self)
18 Parse a QMTest XML test description (.qmt file) to initialize the test 21 log = logging.getLogger(
'QMTest.XMLParser')
22 import xml.etree.ElementTree
as ET
23 log.debug(
'parsing %s', path)
28 for child
in tree.getroot():
29 name = child.attrib[
'name']
30 if hasattr(self, name):
31 log.debug(
'setting %s', name)
33 if name
in (
'args',
'unsupported_platforms'):
34 setattr(self, name, [el.text
35 for el
in value.findall(
'text')])
36 elif name ==
'environment':
37 setattr(self, name, dict(el.text.split(
'=', 1)
38 for el
in value.findall(
'text')))
42 if value.tag ==
'integer':
44 setattr(self, name, data)
48 class CallWrapper(object):
50 Small wrapper class to dynamically bind some default arguments 54 def __init__(self, callable, extra_args={}):
58 from inspect
import getargspec
65 def __call__(self, *args, **kwargs):
73 if a
not in positional
and a
not in kwargs:
80 exported_symbols = {
"self": self,
85 "reference": stdout_ref,
86 "error_reference": stderr_ref,
92 "validateWithReference":
103 "checkTTreesSummaries":
108 "checkHistosSummaries":
115 exec self.
validator in globals(), exported_symbols
116 return result, self.
causes 118 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)
decltype(auto) constexpr apply(F &&f, Tuple &&t) noexcept(noexcept( detail::apply_impl(std::forward< F >(f), std::forward< Tuple >(t), std::make_index_sequence< std::tuple_size< std::remove_reference_t< Tuple >>::value >{})))
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)
def CheckTTreesSummaries(self, stdout=None, result=None, causes=None, trees_dict=None, ignore=r"Basket|.*size|Compression")