Simple (executable) Tests: provide a more human friendly message on failure
Currently we pass/show the raw CmdError as the failure information, resulting
in output like this:
JOB ID : 989cf0b0c8d90fb593eb5bc6ff9291aa3248955c
JOB LOG : /home/cleber/avocado/job-results/job-2020-08-02T16.31-989cf0b/job.log
(1/1) /bin/false: FAIL: Command '/bin/false' failed.\nstdout: b''\nstderr: b''\nadditional_info: None (0.06 s)
RESULTS : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/cleber/avocado/job-results/job-2020-08-02T16.31-989cf0b/results.html
JOB TIME : 0.14 s
Which contains a duplicate of the command path (already in the test
name) an always empty and useless "additional_info", needless new
lines, and very bad formatting. This changes turns it into:
JOB ID : 9cde24d36988d6441f755c14f79b2e908ae533ef
JOB LOG : /home/cleber/avocado/job-results/job-2020-08-02T16.58-9cde24d/job.log
(1/1) /bin/false: FAIL: Exited with status: '1', stdout: '' stderr: '' (0.08 s)
RESULTS : PASS 0 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/cleber/avocado/job-results/job-2020-08-02T16.58-9cde24d/results.html
JOB TIME : 0.16 s
Removing the superfluous, and adding the execution exit status, and
better formatting.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
Showing
想要评论请 注册 或 登录