|
|
c232e6 |
From db2150a5d790c35fb23c6d9d6b29e602482ce555 Mon Sep 17 00:00:00 2001
|
|
|
c232e6 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
c232e6 |
Date: Sun, 30 Aug 2015 03:21:57 -0400
|
|
|
c232e6 |
Subject: [PATCH 06/12] RHEL: Fix tests for libguestfs-winsupport.
|
|
|
c232e6 |
|
|
|
c232e6 |
It doesn't let us use guestfish for arbitrary Windows edits.
|
|
|
c232e6 |
---
|
|
|
c232e6 |
test-data/phony-guests/make-windows-img.sh | 1 +
|
|
|
c232e6 |
tests/test-v2v-virtio-win-iso.sh | 8 +++++++-
|
|
|
c232e6 |
tests/test-v2v-windows-conversion.sh | 8 +++++++-
|
|
|
c232e6 |
3 files changed, 15 insertions(+), 2 deletions(-)
|
|
|
c232e6 |
|
|
|
c232e6 |
diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh
|
|
|
c232e6 |
index 30908a91..73cf5144 100755
|
|
|
c232e6 |
--- a/test-data/phony-guests/make-windows-img.sh
|
|
|
c232e6 |
+++ b/test-data/phony-guests/make-windows-img.sh
|
|
|
c232e6 |
@@ -37,6 +37,7 @@ fi
|
|
|
c232e6 |
|
|
|
c232e6 |
# Create a disk image.
|
|
|
c232e6 |
guestfish <
|
|
|
c232e6 |
+set-program virt-testing
|
|
|
c232e6 |
sparse windows.img-t 512M
|
|
|
c232e6 |
run
|
|
|
c232e6 |
|
|
|
c232e6 |
diff --git a/tests/test-v2v-virtio-win-iso.sh b/tests/test-v2v-virtio-win-iso.sh
|
|
|
c232e6 |
index 69f6f414..b9b806fb 100755
|
|
|
c232e6 |
--- a/tests/test-v2v-virtio-win-iso.sh
|
|
|
c232e6 |
+++ b/tests/test-v2v-virtio-win-iso.sh
|
|
|
c232e6 |
@@ -82,6 +82,12 @@ mktest ()
|
|
|
c232e6 |
:> "$script"
|
|
|
c232e6 |
:> "$expected"
|
|
|
c232e6 |
|
|
|
c232e6 |
+cat >> "$script" <
|
|
|
c232e6 |
+ set-program virt-testing
|
|
|
c232e6 |
+ run
|
|
|
c232e6 |
+ mount /dev/sda2 /
|
|
|
c232e6 |
+EOF
|
|
|
c232e6 |
+
|
|
|
c232e6 |
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
|
|
c232e6 |
mktest "is-dir \"$firstboot_dir\"" true
|
|
|
c232e6 |
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
|
|
c232e6 |
@@ -94,5 +100,5 @@ for drv in netkvm vioscsi viostor; do
|
|
|
c232e6 |
done
|
|
|
c232e6 |
done
|
|
|
c232e6 |
|
|
|
c232e6 |
-guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response"
|
|
|
c232e6 |
+guestfish --ro -a "$d/windows-sda" < "$script" > "$response"
|
|
|
c232e6 |
diff -u "$expected" "$response"
|
|
|
c232e6 |
diff --git a/tests/test-v2v-windows-conversion.sh b/tests/test-v2v-windows-conversion.sh
|
|
|
c232e6 |
index aeab9a48..4b422c5b 100755
|
|
|
c232e6 |
--- a/tests/test-v2v-windows-conversion.sh
|
|
|
c232e6 |
+++ b/tests/test-v2v-windows-conversion.sh
|
|
|
c232e6 |
@@ -76,6 +76,12 @@ mktest ()
|
|
|
c232e6 |
:> "$script"
|
|
|
c232e6 |
:> "$expected"
|
|
|
c232e6 |
|
|
|
c232e6 |
+cat >> "$script" <
|
|
|
c232e6 |
+ set-program virt-testing
|
|
|
c232e6 |
+ run
|
|
|
c232e6 |
+ mount /dev/sda2 /
|
|
|
c232e6 |
+EOF
|
|
|
c232e6 |
+
|
|
|
c232e6 |
firstboot_dir="/Program Files/Guestfs/Firstboot"
|
|
|
c232e6 |
mktest "is-dir \"$firstboot_dir\"" true
|
|
|
c232e6 |
mktest "is-file \"$firstboot_dir/firstboot.bat\"" true
|
|
|
c232e6 |
@@ -88,7 +94,7 @@ for drv in netkvm qxl vioscsi viostor; do
|
|
|
c232e6 |
done
|
|
|
c232e6 |
done
|
|
|
c232e6 |
|
|
|
c232e6 |
-guestfish --ro -a "$d/windows-sda" -i < "$script" > "$response"
|
|
|
c232e6 |
+guestfish --ro -a "$d/windows-sda" < "$script" > "$response"
|
|
|
c232e6 |
diff -u "$expected" "$response"
|
|
|
c232e6 |
|
|
|
c232e6 |
# We also update the Registry several times, for firstboot, and (ONLY
|
|
|
c232e6 |
--
|
|
|
c232e6 |
2.31.1
|
|
|
c232e6 |
|