Ejemplo n.º 1
0
    def wait_until_test_status_is(self, status):
        status = find_dimi_test_status(status)
        test = self._cp['selected_dimi_test']
        start_time = time.time()
        while time.time() < start_time + self._timeout:
            _status = test.status()[0]
            self._debug('Current test status is %s' %
                    dimi_test_status_str(_status))
            if _status == status:
                return
            time.sleep(self._poll_interval)

        raise AssertionError('Test status %s not reached in %s.'
                % (dimi_test_status_str(status),
                    secs_to_timestr(self._timeout)))
Ejemplo n.º 2
0
def print_result(result):
    print '  Error Code:      %d' % result.error_code
    status = result.last_run_status
    print '  Last Run State:  %s (%d)' % (dimi_test_status_str(status), status)
    print '  Result:          %s' % result.result
    print '  Run Duration:    %s' % result.run_duration
    print '  Timestamp:       %s' % result.timestamp
Ejemplo n.º 3
0
def print_dimi_status(status):
    print 'DIMI test status is %s (%d).' % (dimi_test_status_str(status), status)