'A test within this job is completing (detail)'

def test_status_detail(self, code, subdir, operation, status, tag, optional_fields):

    logging.debug('test_status_detail    %s    /    %s    /    %s    /    %s    /    %s    /    %s', code, subdir, operation, status, tag, str(optional_fields))
    if (not subdir):
        return
    "The    mapping    between    beaker    tasks    and    non-beaker    tasks    is    not    easy    to\n                                            separate.        Therefore    we    use    the    START    and    END    markers    along    with    the\n                                            environment    variable    BEAKER_TASK_ID    to    help    us.\n\n                                            We    keep    an    on-disk-file    that    stores    the    tests    we    have    seen    (or    will    run\n                                            [add    by    the    conversion    function    above]).        If    the    test    is    expected,    it\n                                            will    have    a    task    id    associated    with    it    and    we    can    communicate    with    beaker\n                                            about    it.        Otherwise    if    no    'id'    is    found,    assume    this    is    a    sub-task    that\n                                            beaker    doesn't    care    about    and    keep    all    the    results    contained    to    the\n                                            beaker    results    directory.\n                                "
    if code.startswith('START'):
        if ((subdir in self.tests) and (self.tests[subdir] != '0')):
            self.bkr_proxy.task_start(self.tests[subdir])
        else:
            self.write_processed_tests(subdir)
        return
    elif code.startswith('END'):
        if ((subdir in self.tests) and (self.tests[subdir] != '0')):
            self.upload_task_files(self.tests[subdir], subdir)
            self.bkr_proxy.task_stop(self.tests[subdir])
        return
    else:
        if ((subdir in self.tests) and (self.tests[subdir] != '0')):
            task_id = self.tests[subdir]
            task_upload = False
        else:
            if ('BEAKER_TASK_ID' not in os.environ):
                raise error.HarnessError('No    BEAKER_TASK_ID    set')
            task_id = os.environ['BEAKER_TASK_ID']
            task_upload = True
        bkr_status = get_beaker_code(code)
        try:
            resultid = self.bkr_proxy.task_result(task_id, bkr_status, subdir, 1, '')
            if task_upload:
                self.upload_result_files(task_id, resultid, subdir)
        except Exception:
            logging.critical('ERROR:    Failed    to    process    test    results')
