Output Validation Classes.
More...
Output Validation Classes.
Basic implementation of an option validator for Gaudi tests.
This implementation is based on the standard (LCG) validation functions
used in QMTest.
Definition at line 382 of file GaudiTest.py.
◆ __init__()
| def GaudiTest.BasicOutputValidator.__init__ |
( |
|
self, |
|
|
|
ref, |
|
|
|
cause, |
|
|
|
result_key |
|
) |
| |
Definition at line 388 of file GaudiTest.py.
388 def __init__(self, ref, cause, result_key):
391 self.result_key = result_key
◆ __call__()
| def GaudiTest.BasicOutputValidator.__call__ |
( |
|
self, |
|
|
|
out, |
|
|
|
result |
|
) |
| |
Validate the output of the program.
'stdout' -- A string containing the data written to the standard output
stream.
'stderr' -- A string containing the data written to the standard error
stream.
'result' -- A 'Result' object. It may be used to annotate
the outcome according to the content of stderr.
returns -- A list of strings giving causes of failure.
Definition at line 393 of file GaudiTest.py.
393 def __call__(self, out, result):
394 """Validate the output of the program. 396 'stdout' -- A string containing the data written to the standard output 399 'stderr' -- A string containing the data written to the standard error 402 'result' -- A 'Result' object. It may be used to annotate 403 the outcome according to the content of stderr. 405 returns -- A list of strings giving causes of failure.""" 409 if not self.__CompareText(out, self.reference):
410 causes.append(self.cause)
411 result[self.result_key] = result.Quote(self.reference)
◆ __CompareText()
| def GaudiTest.BasicOutputValidator.__CompareText |
( |
|
self, |
|
|
|
s1, |
|
|
|
s2 |
|
) |
| |
|
private |
Compare 's1' and 's2', ignoring line endings.
's1' -- A string.
's2' -- A string.
returns -- True if 's1' and 's2' are the same, ignoring
differences in line endings.
Definition at line 415 of file GaudiTest.py.
415 def __CompareText(self, s1, s2):
416 """Compare 's1' and 's2', ignoring line endings. 422 returns -- True if 's1' and 's2' are the same, ignoring 423 differences in line endings.""" 429 to_ignore = re.compile(
430 r'Warning in <TInterpreter::ReadRootmapFile>: .* is already in .*' 434 return not to_ignore.match(l)
436 return filter(keep_line, s1.splitlines()) == filter(
437 keep_line, s2.splitlines())
439 return s1.splitlines() == s2.splitlines()
def ROOT6WorkAroundEnabled(id=None)
◆ cause
| GaudiTest.BasicOutputValidator.cause |
◆ reference
| GaudiTest.BasicOutputValidator.reference |
◆ result_key
| GaudiTest.BasicOutputValidator.result_key |
The documentation for this class was generated from the following file: