Darryl L. Pierce
2010-Jan-12 16:55 UTC
[Ovirt-devel] [PATCH] Adds the qemu log to the autotest output.
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 <dpierce at redhat.com> --- 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
Mike Burns
2010-Mar-18 22:16 UTC
[Ovirt-devel] [PATCH] Adds the qemu log to the autotest output.
On Tue, 2010-01-12 at 11:55 -0500, Darryl L. Pierce wrote:> 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 <dpierce at redhat.com> > --- > 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; }Won't this fail without a parameter to show_libvirt_log?> 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+ local logfile=/var/log/libvirt/qemu/${1-$nodename}.log if [ ! -e $logfile ]; then return fi> + > + 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 > } >
Seemingly Similar Threads
- [PATCH node] Update autobuild and autotest scripts for new build structure
- [PATCH node-image] Adds a preserve option for autotest VMs.
- [PATCH node-image] Fixing the autotest script.
- [PATCH node-image] Moved all temporary files into a single work directory to clean up.
- [PATCH] The autotest timeout is now a command line configurable option.