avocado.job: Postpone setup/init of the Job class.
The current Job object initialization is doing many setups at once,
for example, it creates a new job results dir with an "id" file inside.
It handles the sysinfo start, update the latest
link, etc. Things that can be done later.
This changes allows split the initialization in subparts:
* _setup_job_results() - creates a new job results directory with an id inside.
* _update_latest_link() - update the "latest (symbolic) link" to the job results.
* _start_sysinfo() - start the system information module.
* _remove_job_results() - remove the current job results from the directory.
So when running tests that are not found, say `avocado run quuuux`
then the job results will be removed and the link for the previous
result (latest) is preserved. Everything else should work as it was before.
Signed-off-by: NRudá Moura <rmoura@redhat.com>
Showing
想要评论请 注册 或 登录