6 def __init__(self
, name
, isFailure
):
8 self
.isFailure
= isFailure
10 PASS
= TestResult('PASS', False)
11 XFAIL
= TestResult('XFAIL', False)
12 FAIL
= TestResult('FAIL', True)
13 XPASS
= TestResult('XPASS', True)
14 UNRESOLVED
= TestResult('UNRESOLVED', True)
15 UNSUPPORTED
= TestResult('UNSUPPORTED', False)
20 """TestFormat - Test information provider."""
22 def __init__(self
, name
):
26 """TestSuite - Information on a group of tests.
28 A test suite groups together a set of logically related tests.
31 def __init__(self
, name
, source_root
, exec_root
, config
):
33 self
.source_root
= source_root
34 self
.exec_root
= exec_root
35 # The test suite configuration.
38 def getSourcePath(self
, components
):
39 return os
.path
.join(self
.source_root
, *components
)
41 def getExecPath(self
, components
):
42 return os
.path
.join(self
.exec_root
, *components
)
45 """Test - Information on a single test instance."""
47 def __init__(self
, suite
, path_in_suite
, config
):
49 self
.path_in_suite
= path_in_suite
51 # The test result code, once complete.
53 # Any additional output from the test, once complete.
55 # The wall time to execute this test, if timing and once complete.
58 def setResult(self
, result
, output
, elapsed
):
59 assert self
.result
is None, "Test result already set!"
62 self
.elapsed
= elapsed
64 def getFullName(self
):
65 return self
.suite
.config
.name
+ '::' + '/'.join(self
.path_in_suite
)
67 def getSourcePath(self
):
68 return self
.suite
.getSourcePath(self
.path_in_suite
)
70 def getExecPath(self
):
71 return self
.suite
.getExecPath(self
.path_in_suite
)