[Pkg-libvirt-commits] [libguestfs] 29/179: log: tests: switch to a temporary file for outputs

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:08:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 2de1602b707ba33676c2d6fdb98a0591aca08b6e
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Wed Oct 8 13:44:25 2014 +0200

    log: tests: switch to a temporary file for outputs
    
    Using a pipe to redirect the output of virt-log will lose his return
    value, so use a temporary file to collect the virt-log output.
---
 cat/test-virt-log.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cat/test-virt-log.sh b/cat/test-virt-log.sh
index d4fa0ed..bcbd6f9 100755
--- a/cat/test-virt-log.sh
+++ b/cat/test-virt-log.sh
@@ -32,6 +32,8 @@ can_handle ()
     esac
 }
 
+tmpfile=`mktemp`
+
 # Read out the log files from the image using virt-log.
 for f in ../tests/guests/{fedora,debian,ubuntu}.img; do
     echo "Trying $f ..."
@@ -45,6 +47,9 @@ for f in ../tests/guests/{fedora,debian,ubuntu}.img; do
         echo
         continue
     fi
-    $VG virt-log -a "$f"
+    $VG virt-log -a "$f" &> $tmpfile
+    cat $tmpfile
     echo
 done
+
+rm -f $tmpfile

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list