avocado.job: Refactor and introduce new error codes for job
We have to tell apart 'expected' avocado error from
plain crashes. Refactor the Job.run() method, separating
it to an unhandled exception auxiliary method, and a
handled one, that properly sets the following return
codes for avocado execution:
* AVOCADO_ALL_OK (0)
Both job and tests PASSed
* AVOCADO_TESTS_FAIL (1)
Job went fine, but some tests FAILed or ERRORed
* AVOCADO_JOB_FAIL (2)
Something went wrong with the Job itself, by explicit
:class:`avocado.core.exceptions.JobError` exception.
* AVOCADO_CRASH (3)
Something else went wrong and avocado plain crashed.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
Showing
想要评论请 注册 或 登录