|
|
ffd6ed |
From bcec3e2389bb58164e8d7faa8952ddea6fcc8f26 Mon Sep 17 00:00:00 2001
|
|
|
ffd6ed |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
ffd6ed |
Date: Sun, 30 Aug 2015 03:21:57 -0400
|
|
|
ffd6ed |
Subject: [PATCH] RHEL 7: Fix tests for libguestfs-winsupport 7.2.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
It doesn't let us use guestfish for arbitrary Windows edits.
|
|
|
ffd6ed |
---
|
|
|
ffd6ed |
tests/charsets/test-charset-fidelity.c | 2 ++
|
|
|
ffd6ed |
tests/guests/guest-aux/make-windows-img.sh | 1 +
|
|
|
ffd6ed |
v2v/test-v2v-windows-conversion.sh | 5 ++++-
|
|
|
ffd6ed |
3 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/tests/charsets/test-charset-fidelity.c b/tests/charsets/test-charset-fidelity.c
|
|
|
ffd6ed |
index 4f2346e..2c11132 100644
|
|
|
ffd6ed |
--- a/tests/charsets/test-charset-fidelity.c
|
|
|
ffd6ed |
+++ b/tests/charsets/test-charset-fidelity.c
|
|
|
ffd6ed |
@@ -91,6 +91,8 @@ main (int argc, char *argv[])
|
|
|
ffd6ed |
if (g == NULL)
|
|
|
ffd6ed |
error (EXIT_FAILURE, 0, "failed to create handle");
|
|
|
ffd6ed |
|
|
|
ffd6ed |
+ guestfs_set_program (g, "virt-testing");
|
|
|
ffd6ed |
+
|
|
|
ffd6ed |
if (guestfs_add_drive_scratch (g, 1024*1024*1024, -1) == -1)
|
|
|
ffd6ed |
exit (EXIT_FAILURE);
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/tests/guests/guest-aux/make-windows-img.sh b/tests/guests/guest-aux/make-windows-img.sh
|
|
|
ffd6ed |
index 575c2ee..02e2b6d 100755
|
|
|
ffd6ed |
--- a/tests/guests/guest-aux/make-windows-img.sh
|
|
|
ffd6ed |
+++ b/tests/guests/guest-aux/make-windows-img.sh
|
|
|
ffd6ed |
@@ -37,6 +37,7 @@ fi
|
|
|
ffd6ed |
|
|
|
ffd6ed |
# Create a disk image.
|
|
|
ffd6ed |
guestfish <
|
|
|
ffd6ed |
+set-program virt-testing
|
|
|
ffd6ed |
sparse windows.img.tmp.$$ 512M
|
|
|
ffd6ed |
run
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/v2v/test-v2v-windows-conversion.sh b/v2v/test-v2v-windows-conversion.sh
|
|
|
ffd6ed |
index 7e8e628..8354bc3 100755
|
|
|
ffd6ed |
--- a/v2v/test-v2v-windows-conversion.sh
|
|
|
ffd6ed |
+++ b/v2v/test-v2v-windows-conversion.sh
|
|
|
ffd6ed |
@@ -71,7 +71,10 @@ test -f $d/windows.xml
|
|
|
ffd6ed |
test -f $d/windows-sda
|
|
|
ffd6ed |
|
|
|
ffd6ed |
# Test some aspects of the target disk image.
|
|
|
ffd6ed |
-guestfish --ro -a $d/windows-sda -i <
|
|
|
ffd6ed |
+guestfish --ro -a $d/windows-sda <
|
|
|
ffd6ed |
+ set-program virt-testing
|
|
|
ffd6ed |
+ run
|
|
|
ffd6ed |
+ mount /dev/sda1 /
|
|
|
ffd6ed |
is-dir "/Program Files/Red Hat/Firstboot"
|
|
|
ffd6ed |
is-file "/Program Files/Red Hat/Firstboot/firstboot.bat"
|
|
|
ffd6ed |
is-dir "/Program Files/Red Hat/Firstboot/scripts"
|
|
|
ffd6ed |
--
|
|
|
ffd6ed |
1.8.3.1
|
|
|
ffd6ed |
|