[PATCH] Do a better job reporting failures from kickstart_tests.

Chris Lumens clumens at redhat.com
Thu Aug 20 14:58:28 UTC 2015


When the failure message is a line from anaconda's logs, it starts with
a timestamp.  Those include colons, so because I am splitting on colons
we get an unhelpful explanation like "03".  Thus, just grab the first
bunch of characters from the log line and display that instead.  It
won't give the complete reaon (which could be very long) but it is a
whole lot more helpful than just a number.
---
 tests/kickstart_tests/run_report.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/kickstart_tests/run_report.sh b/tests/kickstart_tests/run_report.sh
index 6c27cb9..b62b128 100755
--- a/tests/kickstart_tests/run_report.sh
+++ b/tests/kickstart_tests/run_report.sh
@@ -2,7 +2,7 @@
 
 BEGIN {
     printf("\n\n\n%-30s | %-10s | %s\n", "TEST", "RESULT", "EXPLANATION");
-    printf("-------------------------------+------------+---------------------------------------------\n");
+    printf("-------------------------------+------------+--------------------------------------------------------\n");
     FS=":"
 }
 /^RESULT:/ { if ($4 == "Test timed out.") {
@@ -11,9 +11,12 @@ BEGIN {
              } else if (match($0, "Traceback")) {
                  result = "FAILED";
                  explanation = "Traceback";
+             } else if (match($0, "SUCCESS")) {
+                 result = $3;
+                 explanation = "";
              } else {
                  result = $3;
-                 explanation = $4;
+                 explanation = substr($0, index($0, $4), 55);
              }
 
              printf("%-30s | %-10s | %s\n", $2, result, explanation);
-- 
2.4.3



More information about the anaconda-patches mailing list