[PATCH v3 9/9] run_tests: log stderr

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

 



After recent changes to logging, seeing it all the time doesn't help.
We could print one line in summary if stderr is missed.

Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>
---
 run_tests.sh            | 1 +
 scripts/mkstandalone.sh | 1 +
 scripts/runtime.bash    | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/run_tests.sh b/run_tests.sh
index 2a0082163423..3592db317897 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -47,6 +47,7 @@ while getopts "g:hv" opt; do
     esac
 done
 
+RUNTIME_log_stderr='test.log'
 if [ "$PRETTY_PRINT_STACKS" = "yes" ]; then
 	RUNTIME_log_stdout='>(./scripts/pretty_print_stacks.py $kernel >> test.log)'
 else
diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh
index ee01fe0c7777..af2b8f43743c 100755
--- a/scripts/mkstandalone.sh
+++ b/scripts/mkstandalone.sh
@@ -70,6 +70,7 @@ generate_test ()
 
 	echo "exec {stdout}>&1"
 	echo "RUNTIME_log_stdout='>(cat >&\$stdout)'"
+	echo "RUNTIME_log_stderr=>(cat >&2)"
 
 	cat scripts/runtime.bash
 
diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index fc4be91d8727..ff2d98b547b5 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -61,7 +61,8 @@ function run()
 
     # extra_params in the config file may contain backticks that need to be
     # expanded, so use eval to start qemu.  Same for $RUNTIME_log_stdout.
-    summary=$(eval $cmdline > >(eval "tee -a $RUNTIME_log_stdout" | extract_summary))
+    summary=$(eval $cmdline > >(eval "tee -a $RUNTIME_log_stdout" | extract_summary) \
+                            2>> $RUNTIME_log_stderr)
     ret=$?
 
     if [ $ret -eq 0 ]; then
-- 
2.8.1

--
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