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