def _analyze_result(self, exitcode, output, isTimeout, termination_reason):
        """Return status according to result and output of tool."""

        # Ask tool info.
        tool_status = None
        if exitcode is not None:
            logging.debug("My subprocess returned %s.", exitcode)
            tool_status = self.runSet.benchmark.tool.determine_result(
                exitcode.value or 0, exitcode.signal or 0, output, isTimeout)

            if tool_status in result.RESULT_LIST_OTHER:
                # for unspecific results provide some more information if possible
                if exitcode.signal == 6:
                    tool_status = 'ABORTED'
                elif exitcode.signal == 11:
                    tool_status = 'SEGMENTATION FAULT'
                elif exitcode.signal == 15:
                    tool_status = 'KILLED'
                elif exitcode.signal:
                    tool_status = 'KILLED BY SIGNAL '+str(exitcode.signal)

                elif exitcode.value:
                    tool_status = '{} ({})'.format(result.RESULT_ERROR, exitcode.value)

        # Tools sometimes produce a result even after violating a resource limit.
        # This should not be counted, so we overwrite the result with TIMEOUT/OOM
        # here, if this is the case.
        # However, we don't want to forget more specific results like SEGFAULT,
        # so we do this only if the result is a "normal" one like TRUE/FALSE
        # or an unspecific one like UNKNOWN/ERROR.
        status = None
        if isTimeout:
            status = "TIMEOUT"
        elif termination_reason:
            status = _ERROR_RESULTS_FOR_TERMINATION_REASON.get(termination_reason, termination_reason)

        if not status:
            # regular termination
            status = tool_status
        elif tool_status and tool_status not in (
                result.RESULT_LIST_OTHER + [status, 'KILLED', 'KILLED BY SIGNAL 9']):
            # timeout/OOM but tool still returned some result
            status = '{} ({})'.format(status, tool_status)

        return status
def _analyze_result ( self , exitcode , output , isTimeout , termination_reason ) : tool_status = None if exitcode is not None : logging . debug ( "My subprocess returned %s." , exitcode ) tool_status = self . runSet . benchmark . tool . determine_result ( exitcode . value or 0 , exitcode . signal or 0 , output , isTimeout ) if tool_status in result . RESULT_LIST_OTHER : if exitcode . signal == 6 : tool_status = 'ABORTED' elif exitcode . signal == 11 : tool_status = 'SEGMENTATION FAULT' elif exitcode . signal == 15 : tool_status = 'KILLED' elif exitcode . signal : tool_status = 'KILLED BY SIGNAL ' + str ( exitcode . signal ) elif exitcode . value : tool_status = '{} ({})' . format ( result . RESULT_ERROR , exitcode . value ) status = None if isTimeout : status = "TIMEOUT" elif termination_reason : status = _ERROR_RESULTS_FOR_TERMINATION_REASON . get ( termination_reason , termination_reason ) if not status : status = tool_status elif tool_status and tool_status not in ( result . RESULT_LIST_OTHER + [ status , 'KILLED' , 'KILLED BY SIGNAL 9' ] ) : status = '{} ({})' . format ( status , tool_status ) return status
Return status according to result and output of tool.