apw | de1503a | 2006-10-10 08:34:21 +0000 | [diff] [blame] | 1 | """The harness interface |
| 2 | |
| 3 | The interface between the client and the server when hosted. |
| 4 | """ |
| 5 | |
| 6 | __author__ = """Copyright Andy Whitcroft 2006""" |
| 7 | |
| 8 | from autotest_utils import * |
| 9 | import os, sys |
| 10 | |
| 11 | class harness: |
| 12 | """The NULL server harness |
| 13 | |
| 14 | Properties: |
| 15 | job |
| 16 | The job object for this job |
| 17 | """ |
| 18 | |
| 19 | def __init__(self, job): |
| 20 | """ |
| 21 | job |
| 22 | The job object for this job |
| 23 | """ |
| 24 | self.job = job |
| 25 | |
| 26 | |
| 27 | def run_start(self): |
| 28 | """A run within this job is starting""" |
| 29 | pass |
| 30 | |
| 31 | |
| 32 | def run_pause(self): |
| 33 | """A run within this job is completing (expect continue)""" |
| 34 | pass |
| 35 | |
| 36 | |
| 37 | def run_reboot(self): |
| 38 | """A run within this job is performing a reboot |
| 39 | (expect continue following reboot) |
| 40 | """ |
| 41 | pass |
| 42 | |
| 43 | |
mbligh | 61a6c1a | 2006-12-25 01:26:38 +0000 | [diff] [blame^] | 44 | def run_abort(self): |
| 45 | """A run within this job is aborting. It all went wrong""" |
| 46 | pass |
| 47 | |
| 48 | |
| 49 | def run_complete(self): |
apw | de1503a | 2006-10-10 08:34:21 +0000 | [diff] [blame] | 50 | """A run within this job is completing (all done)""" |
| 51 | pass |
| 52 | |
| 53 | |
| 54 | def test_status(self, status): |
| 55 | """A test within this job is completing""" |
| 56 | pass |
| 57 | |
| 58 | |
| 59 | def select(which, job): |
| 60 | if which: |
| 61 | exec "import harness_%s" % (which) |
| 62 | exec "myharness = harness_%s.harness_%s(job)" % (which, which) |
| 63 | else: |
| 64 | myharness = harness(job) |
| 65 | |
apw | de1503a | 2006-10-10 08:34:21 +0000 | [diff] [blame] | 66 | return myharness |