From nobody Mon May 6 09:42:02 2024 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.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154885987916441.40404623042832; Wed, 30 Jan 2019 06:51:19 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E6950C04959F; Wed, 30 Jan 2019 14:51:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8E1D50AAD; Wed, 30 Jan 2019 14:51:12 +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 1A1BE3F604; Wed, 30 Jan 2019 14:51:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x0UEXJuW009904 for ; Wed, 30 Jan 2019 09:33:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1C21A608C8; Wed, 30 Jan 2019 14:33:19 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EEB2608C1; Wed, 30 Jan 2019 14:33:18 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 30 Jan 2019 15:33:16 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: Build and run storagevolxml2xmltest iff WITH_STORAGE 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: , 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 30 Jan 2019 14:51:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit 7a227688a83880 assumes that libvirt_driver_storage_impl.la is always available. Well it is not. Users have option to turn the storage driver off in which case it isn't build and linking the test with the library then fails. Signed-off-by: Michal Privoznik --- And alternative approach might be to move only those test cases that require WITH_STORAGE under #ifdef and link the library again only if WITH_STORAGE is enabled. But this is harder to do properly - I mean for future test cases it will be hard to decide whether to put them inside or outside of WITH_STORAGE section. tests/Makefile.am | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index ab4c716529..c034fe0bf3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -368,6 +368,7 @@ if WITH_STORAGE test_programs +=3D storagevolxml2argvtest test_programs +=3D storagepoolxml2argvtest test_programs +=3D virstorageutiltest +test_programs +=3D storagepoolxml2xmltest endif WITH_STORAGE =20 if WITH_STORAGE_FS @@ -384,7 +385,7 @@ test_programs +=3D nsstest nssguesttest test_libraries +=3D nssmock.la endif WITH_NSS =20 -test_programs +=3D storagevolxml2xmltest storagepoolxml2xmltest +test_programs +=3D storagevolxml2xmltest =20 test_programs +=3D nodedevxml2xmltest =20 @@ -924,9 +925,17 @@ storagepoolxml2argvtest_LDADD =3D \ ../src/libvirt_util.la \ $(LDADDS) =20 +storagepoolxml2xmltest_SOURCES =3D \ + storagepoolxml2xmltest.c \ + testutils.c testutils.h +storagepoolxml2xmltest_LDADD =3D $(LDADDS) \ + ../src/libvirt_driver_storage_impl.la \ + $(GNULIB_LIBS) + else ! WITH_STORAGE EXTRA_DIST +=3D storagevolxml2argvtest.c EXTRA_DIST +=3D virstorageutiltest.c +EXTRA_DIST +=3D storagepoolxml2xmltest.c endif ! WITH_STORAGE =20 storagevolxml2xmltest_SOURCES =3D \ @@ -934,13 +943,6 @@ storagevolxml2xmltest_SOURCES =3D \ testutils.c testutils.h storagevolxml2xmltest_LDADD =3D $(LDADDS) =20 -storagepoolxml2xmltest_SOURCES =3D \ - storagepoolxml2xmltest.c \ - testutils.c testutils.h -storagepoolxml2xmltest_LDADD =3D $(LDADDS) \ - ../src/libvirt_driver_storage_impl.la \ - $(GNULIB_LIBS) - nodedevxml2xmltest_SOURCES =3D \ nodedevxml2xmltest.c \ testutils.c testutils.h --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list