summaryrefslogtreecommitdiffstats
path: root/sysprep/test-virt-sysprep.sh
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-01 20:01:08 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-01 20:01:08 +0100
commit6282d92b1bc4fe57a92f939258d7ccee815fa6ab (patch)
tree9dfd0b5f45e63ed965975192ed8ff71a8aeaaca0 /sysprep/test-virt-sysprep.sh
parent9cb976ab5f9c37b90bfaeacbc1296647429b9bcd (diff)
downloadlibguestfs-6282d92b1bc4fe57a92f939258d7ccee815fa6ab.tar.gz
libguestfs-6282d92b1bc4fe57a92f939258d7ccee815fa6ab.tar.xz
libguestfs-6282d92b1bc4fe57a92f939258d7ccee815fa6ab.zip
sysprep: Simplify and tidy up the test.
Diffstat (limited to 'sysprep/test-virt-sysprep.sh')
-rwxr-xr-xsysprep/test-virt-sysprep.sh15
1 files changed, 7 insertions, 8 deletions
diff --git a/sysprep/test-virt-sysprep.sh b/sysprep/test-virt-sysprep.sh
index 9b800542..7bd6a1c7 100755
--- a/sysprep/test-virt-sysprep.sh
+++ b/sysprep/test-virt-sysprep.sh
@@ -1,6 +1,6 @@
#!/bin/bash -
# libguestfs virt-sysprep test script
-# Copyright (C) 2011 Red Hat Inc.
+# Copyright (C) 2011-2012 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,14 +20,13 @@ export LANG=C
set -e
if [ ! -w /dev/fuse ]; then
- echo "SKIPPING virt-sysprep test, because there is no /dev/fuse."
+ echo "$0: SKIPPING test, because there is no /dev/fuse."
exit 0
fi
-rm -f test.img
+# virt-sysprep with the -n option doesn't modify the guest. It ought
+# to be able to sysprep any of our test guests.
-qemu-img create -f qcow2 -o backing_file=../tests/guests/fedora.img test.img
-
-./virt-sysprep -a test.img
-
-rm -f test.img
+for f in ../tests/guests/{debian,fedora,ubuntu,windows}.img; do
+ ./virt-sysprep -n -a $f
+done