diff mbox

[2/4] job: Write a job HTML report for every autotest client job

Message ID 1304048966-5870-3-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues April 29, 2011, 3:49 a.m. UTC
We have a tool that can generate such a file and it makes it
easier for people who don't have access to the autotest web
interface to analyze job results. With this, all client jobs
write such a file, so test writers don't have to worry about
it.

This change does not regress the job unittests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/bin/job.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/client/bin/job.py b/client/bin/job.py
index 9effcdb..a792309 100644
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -17,6 +17,7 @@  from autotest_lib.client.common_lib import base_job
 from autotest_lib.client.common_lib import error, barrier, log, logging_manager
 from autotest_lib.client.common_lib import base_packages, packages
 from autotest_lib.client.common_lib import global_config
+from autotest_lib.client.tools import html_report
 
 
 LAST_BOOT_TAG = object()
@@ -950,6 +951,9 @@  class base_client_job(base_job.base_job):
             self._tap.write()
             self._tap._write_tap_archive()
 
+        # write out a job HTML report
+        html_report.create_report(self.resultdir)
+
         # We are about to exit 'complete' so clean up the control file.
         dest = os.path.join(self.resultdir, os.path.basename(self._state_file))
         shutil.move(self._state_file, dest)