virt-v2v/0010-tests-Don-t-use-virt-b...

53 lines
1.5 KiB
Diff
Raw Normal View History

From 0ec1a0ef2ec62fb97952d48cdddbdbd3bf8394a7 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Wed, 19 Jan 2022 17:10:56 +0000
Subject: [PATCH] tests: Don't use virt-builder --update when testing Windows
conversions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The error was:
virt-builder: error: cannot use --update because no package manager
has been detected for this guest OS.
If this guest OS is a common one with ordinary package management then this
may have been caused by a failure of libguestfs inspection.
For OSes such as Windows that lack package management, this is not
possible. Try using one of the --firstboot* flags instead (described
in the manual).
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
tests/test-v2v-conversion-of.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/test-v2v-conversion-of.sh b/tests/test-v2v-conversion-of.sh
index 232c6300..5a974d1b 100755
--- a/tests/test-v2v-conversion-of.sh
+++ b/tests/test-v2v-conversion-of.sh
@@ -61,8 +61,17 @@ case "$guestname" in
;;
esac
+# Don't try to update Windows versions.
+case "$guestname" in
+ windows*)
+ ;;
+ *)
+ extra[${#extra[*]}]='--update'
+ ;;
+esac
+
# Build a guest (using virt-builder).
-virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}" --update
+virt-builder "$guestname" --quiet -o "$disk" "${extra[@]}"
# Create some minimal test metadata.
cat > "$xml" <<EOF
--
2.19.1.3.g30247aa5d201