ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
The simple harness interface
"""
 
__author__ = """Copyright Andy Whitcroft, Martin J. Bligh 2006"""
 
import os, harness, time
 
class harness_simple(harness.harness):
    """
    The simple server harness
 
    Properties:
            job
                    The job object for this job
    """
 
    def __init__(self, job, harness_args):
        """
                job
                        The job object for this job
        """
        self.setup(job)
 
        self.status = os.fdopen(3, 'w')
 
 
    def test_status(self, status, tag):
        """A test within this job is completing"""
        if self.status:
            for line in status.split('\n'):
                # prepend status messages with
                # AUTOTEST_STATUS:tag: so that we can tell
                # which lines were sent by the autotest client
                pre = 'AUTOTEST_STATUS:%s:' % (tag,)
                self.status.write(pre + line + '\n')
                self.status.flush()