Result: make sure every job has a result directory
This change makes the initialization of the job results happen a lot earlier than usual, at job instantiation time. It matches the use cases of the "Job API", that is, when users want to manipulate job instances. With this, change it's possible to execute snippets of code such as: >>> from avocado.core.job import Job >>> job = avocado.core.Job() >>> job.log.info("Checking if system is ready") And have that persisted at `job.logdir`, with the "Checking if system is ready" message logged at `job.logfile`. This also addresses the issue that, once a job is created, its result dir is never removed, even if it's empty. The Avocado test runner still behaves mostly the same, that is, if the existing job has no tests (such as when none of the test names given were resolved), it will proceed to the job execution. I'd argue that, since it's not possible (or I'd say desirable) that test resolution happens outside the context of a job, this is the logical way to go. This reinforces the change that a job without a test suite is still a valid job. That's is the reason for the removal of the test that checked if job results directory were removed if Avocado was executed without test names as parameters. Reference: https://trello.com/c/hu4vxQOLSigned-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录