virt.virt_test_utils: run_autotest - 'tar' needs relative paths to strip the leading '/'
[autotest-zwu.git] / client / bin / harness_simple.py
blob3f2b49a546c6846d31cfafe313206091582173cc
1 """
2 The simple harness interface
3 """
5 __author__ = """Copyright Andy Whitcroft, Martin J. Bligh 2006"""
7 import os, harness, time
9 class harness_simple(harness.harness):
10 """
11 The simple server harness
13 Properties:
14 job
15 The job object for this job
16 """
18 def __init__(self, job, harness_args):
19 """
20 job
21 The job object for this job
22 """
23 self.setup(job)
25 self.status = os.fdopen(3, 'w')
28 def test_status(self, status, tag):
29 """A test within this job is completing"""
30 if self.status:
31 for line in status.split('\n'):
32 # prepend status messages with
33 # AUTOTEST_STATUS:tag: so that we can tell
34 # which lines were sent by the autotest client
35 pre = 'AUTOTEST_STATUS:%s:' % (tag,)
36 self.status.write(pre + line + '\n')
37 self.status.flush()