From nobody Sun Feb 8 18:31:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1490647333399461.1383109154058; Mon, 27 Mar 2017 13:42:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 028A722BA13; Mon, 27 Mar 2017 20:42:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C6E3F183BB; Mon, 27 Mar 2017 20:42:11 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7572618523CD; Mon, 27 Mar 2017 20:42:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2RKe5TA020107 for ; Mon, 27 Mar 2017 16:40:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5EF5818988; Mon, 27 Mar 2017 20:40:05 +0000 (UTC) Received: from wheatley.cock.kentus.net (ovpn-116-142.ams2.redhat.com [10.36.116.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE68018991 for ; Mon, 27 Mar 2017 20:40:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 028A722BA13 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 028A722BA13 From: Martin Kletzander To: libvir-list@redhat.com Date: Mon, 27 Mar 2017 22:39:53 +0200 Message-Id: <452f014abf3c34cbba5ec4008ed3f49120a2d2cc.1490647165.git.mkletzan@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] Build vircaps2xmltest and requirements only on Linux X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Mar 2017 20:42:12 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The mock, as well as the test, is only available on Linux. So skip building it everywhere else, especially when it fails on mingw. Signed-off-by: Martin Kletzander --- tests/Makefile.am | 17 ++++++++++------- tests/vircaps2xmltest.c | 16 ++-------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 076734feda70..67cf497b8b27 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -192,7 +192,6 @@ test_programs =3D virshtest sockettest \ domaincapstest \ domainconftest \ virhostdevtest \ - vircaps2xmltest \ virnetdevtest \ virtypedparamtest \ $(NULL) @@ -206,7 +205,6 @@ test_libraries =3D libshunload.la \ virnetdevmock.la \ virrandommock.la \ virhostcpumock.la \ - virnumamock.la \ domaincapsmock.la \ $(NULL) @@ -225,8 +223,10 @@ endif WITH_REMOTE if WITH_LINUX test_programs +=3D fchosttest test_programs +=3D scsihosttest +test_programs +=3D vircaps2xmltest test_libraries +=3D virusbmock.la \ virnetdevbandwidthmock.la \ + virnumamock.la \ virtestmock.la \ $(NULL) endif WITH_LINUX @@ -941,11 +941,6 @@ vircapstest_SOURCES +=3D testutilsxen.c testutilsxen.h endif WITH_XEN vircapstest_LDADD =3D $(qemu_LDADDS) $(LDADDS) -vircaps2xmltest_SOURCES =3D \ - vircaps2xmltest.c testutils.h testutils.c -vircaps2xmltest_LDADD =3D $(LDADDS) - - domaincapsmock_la_SOURCES =3D domaincapsmock.c domaincapsmock_la_CFLAGS =3D $(AM_CFLAGS) domaincapsmock_la_LDFLAGS =3D $(MOCKLIBS_LDFLAGS) @@ -1125,11 +1120,19 @@ virhostcpumock_la_CFLAGS =3D $(AM_CFLAGS) virhostcpumock_la_LDFLAGS =3D $(MOCKLIBS_LDFLAGS) virhostcpumock_la_LIBADD =3D $(MOCKLIBS_LIBS) +if WITH_LINUX +vircaps2xmltest_SOURCES =3D \ + vircaps2xmltest.c testutils.h testutils.c +vircaps2xmltest_LDADD =3D $(LDADDS) + virnumamock_la_SOURCES =3D \ virnumamock.c virnumamock_la_CFLAGS =3D $(AM_CFLAGS) virnumamock_la_LDFLAGS =3D $(MOCKLIBS_LDFLAGS) virnumamock_la_LIBADD =3D $(MOCKLIBS_LIBS) +else ! WITH_LINUX +EXTRA_DIST +=3D vircaps2xmltest.c virnumamock.c +endif ! WITH_LINUX if WITH_NSS nsstest_SOURCES =3D \ diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c index 4dccd452cc82..ffbe9a783811 100644 --- a/tests/vircaps2xmltest.c +++ b/tests/vircaps2xmltest.c @@ -30,8 +30,6 @@ #define VIR_FROM_THIS VIR_FROM_NONE -#ifdef __linux__ - struct virCapabilitiesData { const char *filename; virArch arch; @@ -90,7 +88,7 @@ mymain(void) { int ret =3D 0; -# define DO_TEST_FULL(filename, arch, offlineMigrate, liveMigrate) \ +#define DO_TEST_FULL(filename, arch, offlineMigrate, liveMigrate) \ do { \ struct virCapabilitiesData data =3D {filename, arch, \ offlineMigrate, \ @@ -99,7 +97,7 @@ mymain(void) ret =3D -1; \ } while (0) -# define DO_TEST(filename, arch) DO_TEST_FULL(filename, arch, true, true) +#define DO_TEST(filename, arch) DO_TEST_FULL(filename, arch, true, true) DO_TEST_FULL("basic", VIR_ARCH_X86_64, false, false); DO_TEST_FULL("basic", VIR_ARCH_AARCH64, true, false); @@ -110,13 +108,3 @@ mymain(void) } VIRT_TEST_MAIN_PRELOAD(mymain, abs_builddir "/.libs/virnumamock.so") - -#else /* !__linux__ */ - -int -main(void) -{ - return EXIT_AM_SKIP; -} - -#endif /* !__linux__ */ --=20 2.12.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list