mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0152-v2v-tests-Don-t-need-to-generate-test-v2v-networks-a.patch

ffd6ed
From b5b5ab4965b777e9f4e22739a0ecb1284a66db36 Mon Sep 17 00:00:00 2001
ffd6ed
From: "Richard W.M. Jones" <rjones@redhat.com>
ffd6ed
Date: Mon, 20 Apr 2015 21:06:15 +0100
ffd6ed
Subject: [PATCH] v2v: tests: Don't need to generate
ffd6ed
 test-v2v-networks-and-bridges.xml.
ffd6ed
ffd6ed
virt-v2v understands relative paths in libvirt XML (even though they
ffd6ed
are not legal and libvirt itself wouldn't generate it).  We don't need
ffd6ed
to generate this file.
ffd6ed
ffd6ed
(cherry picked from commit 3834a1064f866eef4c34440e6dd5023cc47ff7e1)
ffd6ed
---
ffd6ed
 configure.ac                             |  3 +-
ffd6ed
 v2v/Makefile.am                          |  7 +--
ffd6ed
 v2v/test-v2v-networks-and-bridges.xml    | 85 +++++++++++++++++++++++++++++++
ffd6ed
 v2v/test-v2v-networks-and-bridges.xml.in | 87 --------------------------------
ffd6ed
 4 files changed, 87 insertions(+), 95 deletions(-)
ffd6ed
 create mode 100644 v2v/test-v2v-networks-and-bridges.xml
ffd6ed
 delete mode 100644 v2v/test-v2v-networks-and-bridges.xml.in
ffd6ed
ffd6ed
diff --git a/configure.ac b/configure.ac
ffd6ed
index 74c72a1..98ea3eb 100644
ffd6ed
--- a/configure.ac
ffd6ed
+++ b/configure.ac
ffd6ed
@@ -1748,8 +1748,7 @@ AC_CONFIG_FILES([Makefile
ffd6ed
                  tests/xfs/Makefile
ffd6ed
                  tests/xml/Makefile
ffd6ed
                  tools/Makefile
ffd6ed
-                 v2v/Makefile
ffd6ed
-                 v2v/test-v2v-networks-and-bridges.xml])
ffd6ed
+                 v2v/Makefile])
ffd6ed
 AC_OUTPUT
ffd6ed
 
ffd6ed
 dnl Produce summary.
ffd6ed
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
ffd6ed
index 731e51b..ab26baf 100644
ffd6ed
--- a/v2v/Makefile.am
ffd6ed
+++ b/v2v/Makefile.am
ffd6ed
@@ -30,7 +30,7 @@ EXTRA_DIST = \
ffd6ed
 	test-v2v-i-ova-two-disks.expected \
ffd6ed
 	test-v2v-i-ova-two-disks.ovf \
ffd6ed
 	test-v2v-networks-and-bridges-expected.xml \
ffd6ed
-	test-v2v-networks-and-bridges.xml.in \
ffd6ed
+	test-v2v-networks-and-bridges.xml \
ffd6ed
 	virt-v2v.pod
ffd6ed
 
ffd6ed
 CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o virt-v2v
ffd6ed
@@ -247,11 +247,6 @@ TESTS += \
ffd6ed
 	test-v2v-windows-conversion.sh
ffd6ed
 endif ENABLE_APPLIANCE
ffd6ed
 
ffd6ed
-# This forces the file to be updated before running the tests, in case
ffd6ed
-# the .xml.in file has been changed.  Be nice if automake just did the
ffd6ed
-# right thing here.
ffd6ed
-check_DATA = test-v2v-networks-and-bridges.xml
ffd6ed
-
ffd6ed
 check-valgrind:
ffd6ed
 	$(MAKE) VG="$(top_builddir)/run @VG@" check
ffd6ed
 
ffd6ed
diff --git a/v2v/test-v2v-networks-and-bridges.xml b/v2v/test-v2v-networks-and-bridges.xml
ffd6ed
new file mode 100644
ffd6ed
index 0000000..33e244a
ffd6ed
--- /dev/null
ffd6ed
+++ b/v2v/test-v2v-networks-and-bridges.xml
ffd6ed
@@ -0,0 +1,85 @@
ffd6ed
+
ffd6ed
+libguestfs virt-v2v tool
ffd6ed
+Copyright (C) 2009-2014 Red Hat Inc.
ffd6ed
+
ffd6ed
+This program is free software; you can redistribute it and/or modify
ffd6ed
+it under the terms of the GNU General Public License as published by
ffd6ed
+the Free Software Foundation; either version 2 of the License, or
ffd6ed
+(at your option) any later version.
ffd6ed
+
ffd6ed
+This program is distributed in the hope that it will be useful,
ffd6ed
+but WITHOUT ANY WARRANTY; without even the implied warranty of
ffd6ed
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ffd6ed
+GNU General Public License for more details.
ffd6ed
+
ffd6ed
+You should have received a copy of the GNU General Public License
ffd6ed
+along with this program; if not, write to the Free Software
ffd6ed
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
ffd6ed
+-->
ffd6ed
+<node>
ffd6ed
+  <domain type='test'>
ffd6ed
+    <name>windows</name>
ffd6ed
+    <memory>1048576</memory>
ffd6ed
+    <os>
ffd6ed
+      <type>hvm</type>
ffd6ed
+      <boot dev='hd'/>
ffd6ed
+    </os>
ffd6ed
+    <devices>
ffd6ed
+      <disk type='file' device='disk'>
ffd6ed
+        <driver name='qemu' type='raw'/>
ffd6ed
+        <source file='../tests/guests/windows.img'/>
ffd6ed
+        <target dev='vda' bus='virtio'/>
ffd6ed
+      </disk>
ffd6ed
+
ffd6ed
+      
ffd6ed
+           be renamed by the test -->
ffd6ed
+
ffd6ed
+      
ffd6ed
+      <interface type='bridge'>
ffd6ed
+        <mac address='00:00:00:00:00:00'/>
ffd6ed
+        <source bridge='VM Network'/>
ffd6ed
+        <model type='e1000'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      
ffd6ed
+      <interface type='bridge'>
ffd6ed
+        <mac address='52:54:00:01:02:03'/>
ffd6ed
+        <source bridge='bob'/>
ffd6ed
+        <model type='e1000'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      
ffd6ed
+      <interface type='network'>
ffd6ed
+        <mac address='52:54:00:01:02:04'/>
ffd6ed
+        <source network='default'/>
ffd6ed
+        <model type='virtio'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      
ffd6ed
+      <interface type='network'>
ffd6ed
+        <mac address='52:54:00:01:02:05'/>
ffd6ed
+        <source network='john'/>
ffd6ed
+        <model type='virtio'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      <interface type='network'>
ffd6ed
+        <source network='paul'/>
ffd6ed
+        <model type='virtio'/>
ffd6ed
+        <mac address='52:54:00:01:02:06'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      <interface type='network'>
ffd6ed
+        <model type='rtl8139'/>
ffd6ed
+        <source network='george'/>
ffd6ed
+        <mac address='52:54:00:01:02:07'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+      <interface type='network'>
ffd6ed
+        <mac address='52:54:00:01:02:08'/>
ffd6ed
+        <model type='virtio'/>
ffd6ed
+        <source network='ringo'/>
ffd6ed
+      </interface>
ffd6ed
+
ffd6ed
+    </devices>
ffd6ed
+  </domain>
ffd6ed
+</node>
ffd6ed
diff --git a/v2v/test-v2v-networks-and-bridges.xml.in b/v2v/test-v2v-networks-and-bridges.xml.in
ffd6ed
deleted file mode 100644
ffd6ed
index 2142c08..0000000
ffd6ed
--- a/v2v/test-v2v-networks-and-bridges.xml.in
ffd6ed
+++ /dev/null
ffd6ed
@@ -1,87 +0,0 @@
ffd6ed
-
ffd6ed
-libguestfs virt-v2v tool
ffd6ed
-Copyright (C) 2009-2014 Red Hat Inc.
ffd6ed
-
ffd6ed
-This program is free software; you can redistribute it and/or modify
ffd6ed
-it under the terms of the GNU General Public License as published by
ffd6ed
-the Free Software Foundation; either version 2 of the License, or
ffd6ed
-(at your option) any later version.
ffd6ed
-
ffd6ed
-This program is distributed in the hope that it will be useful,
ffd6ed
-but WITHOUT ANY WARRANTY; without even the implied warranty of
ffd6ed
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ffd6ed
-GNU General Public License for more details.
ffd6ed
-
ffd6ed
-You should have received a copy of the GNU General Public License
ffd6ed
-along with this program; if not, write to the Free Software
ffd6ed
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
ffd6ed
-
ffd6ed
-@configure_input@
ffd6ed
--->
ffd6ed
-<node>
ffd6ed
-  <domain type='test'>
ffd6ed
-    <name>windows</name>
ffd6ed
-    <memory>1048576</memory>
ffd6ed
-    <os>
ffd6ed
-      <type>hvm</type>
ffd6ed
-      <boot dev='hd'/>
ffd6ed
-    </os>
ffd6ed
-    <devices>
ffd6ed
-      <disk type='file' device='disk'>
ffd6ed
-        <driver name='qemu' type='raw'/>
ffd6ed
-        <source file='@abs_top_builddir@/tests/guests/windows.img'/>
ffd6ed
-        <target dev='vda' bus='virtio'/>
ffd6ed
-      </disk>
ffd6ed
-
ffd6ed
-      
ffd6ed
-           be renamed by the test -->
ffd6ed
-
ffd6ed
-      
ffd6ed
-      <interface type='bridge'>
ffd6ed
-        <mac address='00:00:00:00:00:00'/>
ffd6ed
-        <source bridge='VM Network'/>
ffd6ed
-        <model type='e1000'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      
ffd6ed
-      <interface type='bridge'>
ffd6ed
-        <mac address='52:54:00:01:02:03'/>
ffd6ed
-        <source bridge='bob'/>
ffd6ed
-        <model type='e1000'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      
ffd6ed
-      <interface type='network'>
ffd6ed
-        <mac address='52:54:00:01:02:04'/>
ffd6ed
-        <source network='default'/>
ffd6ed
-        <model type='virtio'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      
ffd6ed
-      <interface type='network'>
ffd6ed
-        <mac address='52:54:00:01:02:05'/>
ffd6ed
-        <source network='john'/>
ffd6ed
-        <model type='virtio'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      <interface type='network'>
ffd6ed
-        <source network='paul'/>
ffd6ed
-        <model type='virtio'/>
ffd6ed
-        <mac address='52:54:00:01:02:06'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      <interface type='network'>
ffd6ed
-        <model type='rtl8139'/>
ffd6ed
-        <source network='george'/>
ffd6ed
-        <mac address='52:54:00:01:02:07'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-      <interface type='network'>
ffd6ed
-        <mac address='52:54:00:01:02:08'/>
ffd6ed
-        <model type='virtio'/>
ffd6ed
-        <source network='ringo'/>
ffd6ed
-      </interface>
ffd6ed
-
ffd6ed
-    </devices>
ffd6ed
-  </domain>
ffd6ed
-</node>
ffd6ed
-- 
ffd6ed
1.8.3.1
ffd6ed