Result created by the output processor.
| 22 | |
| 23 | |
| 24 | class Result(ResultBase): |
| 25 | """Result created by the output processor.""" |
| 26 | |
| 27 | def __init__(self, |
| 28 | has_unexpected_output, |
| 29 | output, |
| 30 | cmd=None, |
| 31 | error_details=None): |
| 32 | self.has_unexpected_output = has_unexpected_output |
| 33 | self.output = output |
| 34 | self.cmd = cmd |
| 35 | self.error_details = error_details |
| 36 | |
| 37 | def status(self): |
| 38 | if self.has_unexpected_output: |
| 39 | if not hasattr(self.output, "HasCrashed"): |
| 40 | raise Exception(type(self)) |
| 41 | if self.output.HasCrashed(): |
| 42 | return 'CRASH' |
| 43 | else: |
| 44 | return 'FAIL' |
| 45 | else: |
| 46 | return 'PASS' |
| 47 | |
| 48 | |
| 49 | class GroupedResult(ResultBase): |
no outgoing calls