|
| def | __init__ (self, path=None) |
| |
| def | XMLParser (self, path) |
| |
| def | ValidateOutput (self, stdout, stderr, result) |
| |
| def | __init__ (self) |
| |
| def | run (self) |
| |
| def | findReferenceBlock (self, reference=None, stdout=None, result=None, causes=None, signature_offset=0, signature=None, id=None) |
| |
| def | countErrorLines (self, expected={"ERROR":0, "FATAL":0}, stdout=None, result=None, causes=None) |
| |
| def | CheckTTreesSummaries (self, stdout=None, result=None, causes=None, trees_dict=None, ignore=r"Basket|.*size|Compression") |
| |
| def | CheckHistosSummaries (self, stdout=None, result=None, causes=None, dict=None, ignore=None) |
| |
| def | validateWithReference (self, stdout=None, stderr=None, result=None, causes=None, preproc=None) |
| |
Definition at line 19 of file QMTTest.py.
◆ __init__()
| def GaudiTesting.QMTTest.QMTTest.__init__ |
( |
|
self, |
|
|
|
path = None |
|
) |
| |
Definition at line 20 of file QMTTest.py.
20 def __init__(self, path=None):
21 BaseTest.__init__(self)
◆ ValidateOutput()
| def GaudiTesting.QMTTest.QMTTest.ValidateOutput |
( |
|
self, |
|
|
|
stdout, |
|
|
|
stderr, |
|
|
|
result |
|
) |
| |
Reimplemented from GaudiTesting.BaseTest.BaseTest.
Definition at line 66 of file QMTTest.py.
66 def ValidateOutput(self, stdout, stderr, result):
69 class CallWrapper(object):
71 Small wrapper class to dynamically bind some default arguments
75 def __init__(self, callable, extra_args={}):
76 self.callable = callable
77 self.extra_args = extra_args
79 from inspect
import getargspec
81 self.args_order = getargspec(callable)[0]
84 if self.args_order[0] ==
"self":
85 del self.args_order[0]
89 positional = self.args_order[: len(args)]
92 for a
in self.extra_args:
95 if a
not in positional
and a
not in kwargs:
96 kwargs[a] = self.extra_args[a]
97 return self.callable(*args, **kwargs)
100 stdout_ref = self._expandReferenceFileName(self.reference)
101 stderr_ref = self._expandReferenceFileName(self.error_reference)
107 "causes": self.causes,
108 "reference": stdout_ref,
109 "error_reference": stderr_ref,
110 "findReferenceBlock": CallWrapper(
111 self.findReferenceBlock,
112 {
"stdout": stdout,
"result": result,
"causes": self.causes},
114 "validateWithReference": CallWrapper(
115 self.validateWithReference,
120 "causes": self.causes,
123 "countErrorLines": CallWrapper(
124 self.countErrorLines,
125 {
"stdout": stdout,
"result": result,
"causes": self.causes},
127 "checkTTreesSummaries": CallWrapper(
128 self.CheckTTreesSummaries,
129 {
"stdout": stdout,
"result": result,
"causes": self.causes},
131 "checkHistosSummaries": CallWrapper(
132 self.CheckHistosSummaries,
133 {
"stdout": stdout,
"result": result,
"causes": self.causes},
137 exec(self.validator, globals(), exported_symbols)
138 return result, self.causes
140 return super(QMTTest, self).ValidateOutput(stdout, stderr, result)
◆ XMLParser()
| def GaudiTesting.QMTTest.QMTTest.XMLParser |
( |
|
self, |
|
|
|
path |
|
) |
| |
Parse a QMTest XML test description (.qmt file) to initialize the test
instance.
Definition at line 26 of file QMTTest.py.
26 def XMLParser(self, path):
28 Parse a QMTest XML test description (.qmt file) to initialize the test
31 from string
import Template
33 log = logging.getLogger(
"QMTest.XMLParser")
34 import xml.etree.ElementTree
as ET
36 log.debug(
"parsing %s", path)
39 os.path.relpath(path, self.basedir)
46 for child
in tree.getroot():
47 name = child.attrib[
"name"]
48 if hasattr(self, name):
49 log.debug(
"setting %s", name)
51 if name
in (
"args",
"unsupported_platforms"):
52 setattr(self, name, [el.text
for el
in value.findall(
"text")])
53 elif name ==
"environment":
54 for el
in value.findall(
"text"):
55 key, value = el.text.split(
"=", 1)
56 self.environment[key] = Template(value).safe_substitute(
62 if value.tag ==
"integer":
64 setattr(self, name, data)
◆ args_order
| GaudiTesting.QMTTest.QMTTest.args_order |
◆ callable
| GaudiTesting.QMTTest.QMTTest.callable |
◆ extra_args
| GaudiTesting.QMTTest.QMTTest.extra_args |
◆ name
| GaudiTesting.QMTTest.QMTTest.name |
◆ validator
| GaudiTesting.QMTTest.QMTTest.validator |
The documentation for this class was generated from the following file: