[Pkg-libvirt-commits] [libguestfs] 91/384: p2v: Test two disk guest.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:55:50 UTC 2015


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

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 603d0fbd95fecebed75ebd02f5b1cd4d1b729571
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Dec 12 17:41:47 2014 +0000

    p2v: Test two disk guest.
    
    Make the test harder (evil grin).
---
 p2v/test-virt-p2v.sh | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/p2v/test-virt-p2v.sh b/p2v/test-virt-p2v.sh
index f4d28d1..6297048 100755
--- a/p2v/test-virt-p2v.sh
+++ b/p2v/test-virt-p2v.sh
@@ -32,11 +32,17 @@ if [ "$(guestfish get-backend)" = "uml" ]; then
     exit 77
 fi
 
-f="$(cd ../tests/guests && pwd)/windows.img"
-if ! test -f $f || ! test -s $f; then
+guestsdir="$(cd ../tests/guests && pwd)"
+f1="$guestsdir/windows.img"
+if ! test -f $f1 || ! test -s $f1; then
     echo "$0: test skipped because phony Windows image was not created"
     exit 77
 fi
+f2="$guestsdir/blank-part.img"
+if ! test -f $f2 || ! test -s $f2; then
+    echo "$0: test skipped because blank-part.img was not created"
+    exit 77
+fi
 
 virt_tools_data_dir=${VIRT_TOOLS_DATA_DIR:-/usr/share/virt-tools}
 if ! test -r $virt_tools_data_dir/rhsrvany.exe; then
@@ -59,12 +65,13 @@ export PATH=$d:$PATH
 # under test (because of the ./run script).
 
 # The Linux kernel command line.
-cmdline="p2v.server=localhost p2v.name=windows p2v.debug p2v.disks=$f p2v.o=local p2v.os=$d p2v.network=em1:wired,other"
+cmdline="p2v.server=localhost p2v.name=windows p2v.debug p2v.disks=$f1,$f2 p2v.o=local p2v.os=$d p2v.network=em1:wired,other"
 
 virt-p2v --cmdline="$cmdline"
 
 # Test the libvirt XML metadata and a disk was created.
 test -f $d/windows.xml
 test -f $d/windows-sda
+test -f $d/windows-sdb
 
 rm -r $d

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