def on_task_failure(self, task): self._num_failed_tasks += 1 msg = f'{task.info()}' if task.failed_stage == 'cleanup': self.printer.status('ERROR', msg, just='right') else: self.printer.status('FAIL', msg, just='right') timings = task.pipeline_timings([ 'setup', 'compile_complete', 'run_complete', 'sanity', 'performance', 'total' ]) getlogger().info(f'==> test failed during {task.failed_stage!r}: ' f'test staged in {task.check.stagedir!r}') getlogger().verbose(f'==> {timings}') if self._num_failed_tasks >= self.max_failures: raise FailureLimitError( f'maximum number of failures ({self.max_failures}) reached')
def on_task_failure(self, task): if task.aborted: return self._num_failed_tasks += 1 msg = f'{task.check.info()} [{task.pipeline_timings_basic()}]' if task.failed_stage == 'cleanup': self.printer.status('ERROR', msg, just='right') else: self._remove_from_running(task) self.printer.status('FAIL', msg, just='right') stagedir = task.check.stagedir if not stagedir: stagedir = '<not available>' getlogger().info(f'==> test failed during {task.failed_stage!r}: ' f'test staged in {stagedir!r}') getlogger().verbose(f'==> timings: {task.pipeline_timings_all()}') if self._num_failed_tasks >= self.max_failures: raise FailureLimitError( f'maximum number of failures ({self.max_failures}) reached')