@@ -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()
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@redhat.com> --- run_tests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)