[PATCH kvm-unit-tests 6/6] run_tests: print summary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add shortened SUMMARY line into the output (in parentheses).

Might be interesting and hopefully won't break too many scripts.

Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>
---
 run_tests.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/run_tests.sh b/run_tests.sh
index b0b064f2e341..d0b282f7b079 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -21,6 +21,7 @@ function run()
     local arch="$6"
     local check="$7"
     local accel="$8"
+    local output
 
     if [ -z "$testname" ]; then
         return
@@ -47,7 +48,7 @@ function run()
 
     # extra_params in the config file may contain backticks that need to be
     # expanded, so use eval to start qemu
-    eval $cmdline >> test.log
+    output=`eval $cmdline`
     # The first bit of return value is too hard to use, just skip it.
     # Unit-tests' return value is shifted by one.
     case $(($? >> 1)) in
@@ -56,7 +57,11 @@ function run()
     *)  echo -ne "\e[31mFAIL\e[0m"
     esac
 
-    echo " $1"
+    echo -n " $1 "
+
+    printf "%s\n" "$output" |
+      tee -a test.log |
+      sed 'x;$s/^SUMMARY: //;ta;$s/.*//p;d;:a s/^/(/;s/$/)/'
 }
 
 function usage()
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux