Currently, if we have a large, multi word string for a
value on a keyval, the results email will display it in
a single line. It's better to split the value and display
it indented, instead.

Before

key_to_display: foo.rpm bar.rpm baz.rpm zilch.rpm

After

key_to_display:
  foo.rpm
  bar.rpm
  baz.rpm
  zilch.rpm

Also, move extra information display after the FAIL/PASS
reports, as they're the most important information
on such an email.

CC: Ademar Reis <ar...@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <l...@redhat.com>
---
 scheduler/scheduler_models.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/scheduler/scheduler_models.py b/scheduler/scheduler_models.py
index 6dd1bae..6e2872c 100644
--- a/scheduler/scheduler_models.py
+++ b/scheduler/scheduler_models.py
@@ -637,17 +637,20 @@ class HostQueueEntry(DBObject):
 
             body += "\n%s\n\n" % self._view_job_url()
 
-        keyval_list = job_stats['keyval_dict_list']
-        if keyval_list:
-            for kv in keyval_list:
-                k, v = kv.items()[0]
-                body += "%s: %s\n\n" % (k, v)
-
         body += job_stats['fail_detail']
         body += job_stats['warn_detail']
         body += job_stats['skip_detail']
         body += job_stats['pass_detail']
 
+        keyval_list = job_stats['keyval_dict_list']
+        if keyval_list:
+            for kv in keyval_list:
+                k, v = kv.items()[0]
+                body += "%s:\n" % k
+                for part in v.split():
+                    body += "  %s\n" % part
+                body += "\n"
+
         if hostname is not None:
             body += "Job was run on host %s\n" % hostname
 
-- 
1.7.11.4

_______________________________________________
Autotest-kernel mailing list
Autotest-kernel@redhat.com
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to