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ář <rkrc...@redhat.com>
---
 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to