When an autotest finishes running, then the output for the qemu logfile in /var/log/libvirt/qemu/ is added to the output.
Signed-off-by: Darryl L. Pierce <[email protected]> --- autotest.sh | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/autotest.sh b/autotest.sh index 7503be0..5ccdbbb 100755 --- a/autotest.sh +++ b/autotest.sh @@ -41,8 +41,9 @@ ME=$(basename "$0") WORKDIR=$(mktemp -d) + warn() { printf '%s: %s\n' "$ME" "$*" >&2; } -die() { warn "$*"; exit 1; } +die() { warn "$*"; show_libvirt_log; exit 1; } debug() { if $debugging; then log "[DEBUG] %s" "$*"; fi } trap '__st=$?; cleanup_after_testing; exit $__st' 1 2 3 13 15 @@ -69,6 +70,15 @@ Usage: $ME [-n test_name] [LOGFILE] EOF } +# $1 - the nodename +show_libvirt_log () { + local logfile=/var/log/libvirt/qemu/$1.log + + printf "\n[${logfile}]\n" + sudo cat $logfile + printf "[${logfile}]\n\n" +} + # $1 - the test function to call execute_test () { local testname=$1 @@ -404,6 +414,8 @@ destroy_node () { sudo virsh undefine $nodename > /dev/null 2>&1 fi fi + + show_libvirt_log $nodename fi } -- 1.6.5.2 _______________________________________________ Ovirt-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/ovirt-devel
