From 26e120b9d6db8df6345b5c4abbe1f559bce0dcdd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 24 Oct 2019 14:38:15 +0100 Subject: [PATCH] vddk: Disable tests on non-x86 platforms. --- ...k-Disable-tests-on-non-x86-platforms.patch | 48 +++++++++++++++++++ nbdkit.spec | 5 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 0001-vddk-Disable-tests-on-non-x86-platforms.patch diff --git a/0001-vddk-Disable-tests-on-non-x86-platforms.patch b/0001-vddk-Disable-tests-on-non-x86-platforms.patch new file mode 100644 index 0000000..4dfe5cf --- /dev/null +++ b/0001-vddk-Disable-tests-on-non-x86-platforms.patch @@ -0,0 +1,48 @@ +From c472b47a55a331dcb5cc75def71cc665abbc06db Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Thu, 24 Oct 2019 14:36:54 +0100 +Subject: [PATCH] vddk: Disable tests on non-x86 platforms. + +Fixes commit a0184ba081164218ddd1928ed48a75fca93406bc. +--- + tests/Makefile.am | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 558ea86..2db5e7b 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -162,12 +162,14 @@ check-valgrind: + check-root: + $(MAKE) check TESTS="test-file-block" + ++if HAVE_VDDK + # Run a basic check against a real copy of VDDK. You must set + # vddkdir to point to the library location, eg: + # + # make check-vddk vddkdir=vmware-vix-disklib-distrib + check-vddk: + $(MAKE) check TESTS=test-vddk-real.sh ++endif HAVE_VDDK + + #---------------------------------------------------------------------- + # Basic server command line and start-up tests. +@@ -713,6 +715,7 @@ test_streaming_SOURCES = test-streaming.c test.h + test_streaming_CFLAGS = $(WARNINGS_CFLAGS) $(LIBGUESTFS_CFLAGS) + test_streaming_LDADD = libtest.la $(LIBGUESTFS_LIBS) + ++if HAVE_VDDK + # VDDK plugin test. + # This only tests that the plugin can be loaded against a + # dummy VDDK library, it is not a detailed test. +@@ -737,6 +740,7 @@ libvixDiskLib_la_CXXFLAGS = $(WARNINGS_CFLAGS) + libvixDiskLib_la_LDFLAGS = \ + -shared -version-number 6:0:0 -rpath /nowhere \ + $(NULL) ++endif HAVE_VDDK + + # zero plugin test. + TESTS += test-zero.sh +-- +2.23.0 + diff --git a/nbdkit.spec b/nbdkit.spec index 3caf080..56cd8da 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -21,7 +21,7 @@ %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.15-development @@ -41,6 +41,9 @@ Source1: http://libguestfs.org/download/nbdkit/%{source_directory}/%{name Source2: libguestfs.keyring %endif +# Upstream in > 1.15.6. +Patch1: 0001-vddk-Disable-tests-on-non-x86-platforms.patch + %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool %endif