From nobody Sun Feb 8 18:31:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594894443; cv=none; d=zohomail.com; s=zohoarc; b=lafrlLB8KKeIlJ1v9Q2pStwU3SGwEhMOaK2eurivI5kZeO+ixzGha7Xwkr99HCaS2lUEKgOhD+uFAEpuGNnzaHe9oPtjbbxISoq26ydeMjh9N77QfaSp9vF552v11+4H9Bl0drcTE9EXArx6koU+zb6VCOI1Ni8n8Z3fhmGx9k4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894443; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=tUNJv+rxI0xM3fD2sdRKsk48BZQB1qjmled1Bj10vyk=; b=mh8e4sZb0HhdQu1I+r1Mx0LGNwbJx1VB62L7b73gelEYKmslDb2k516Ql2U7B4MY+TADnejfmpYH4hB51fMPWRu/vFhk/U5vKsOBJX8MiK2ox/jJmnLEBKbo5mpCGEEIatYXrOlPO3ihfhVz+Vl6dRv3KR3gcjVR1QOboy37tdQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594894443839423.9899733103939; Thu, 16 Jul 2020 03:14:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-463-rJo9Y9DXPwGL3XEyg_KCtg-1; Thu, 16 Jul 2020 06:10:42 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 913ED108E; Thu, 16 Jul 2020 10:10:34 +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 38EF672AEF; Thu, 16 Jul 2020 10:10:34 +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 0985BA3709; Thu, 16 Jul 2020 10:10:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA6kKK019855 for ; Thu, 16 Jul 2020 06:06:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0AB5F2B6DC; Thu, 16 Jul 2020 10:06:46 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 793A92B6DB for ; Thu, 16 Jul 2020 10:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894442; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tUNJv+rxI0xM3fD2sdRKsk48BZQB1qjmled1Bj10vyk=; b=InaxiDiO7pf6CuZHT/ao12WPPiD/sHlaKeDUa40uuj4gnC/CKTphy8pn2N3kCNHWgYu4Ne iNxKLxaflbBkjVFlJWlu/EL8og4279KEcxwZKFfjsi1tOoebnapuuaNlPu/WYPm8uhTCrX 6a5d3acRQy+3ZWfKq8Yf/1d/mGy/7+I= X-MC-Unique: rJo9Y9DXPwGL3XEyg_KCtg-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 285/351] meson: tests: add test binaries build support Date: Thu, 16 Jul 2020 11:58:41 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- tests/Makefile.am | 12 ------------ tests/meson.build | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 856ae8dad15..45740b3e08a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -16,18 +16,6 @@ ## License along with this library. If not, see ## . =20 -PROBES_O =3D -if WITH_DTRACE_PROBES -PROBES_O +=3D ../src/libvirt_probes.lo -endif WITH_DTRACE_PROBES - -LDADDS =3D \ - $(NO_INDIRECT_LDFLAGS) \ - $(PROBES_O) \ - ../src/libvirt.la \ - $(GLIB_LIBS) \ - $(NULL) - test_programs =3D virshtest sockettest \ virhostcputest virbuftest \ commandtest seclabeltest \ diff --git a/tests/meson.build b/tests/meson.build index cdcb87453fc..1fb332e7973 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -228,3 +228,48 @@ executable( coverage_flags, ], ) + + +# build and define libvirt tests + +# tests: +# each entry is a dictionary with following items: +# * name - name of the test which is also used as default source file na= me (required) +# * sources - override default sources based on name (optional, default = [ '$name.c' ]) +# * c_args - args used by test (optional, default []) +# * deps - additional dependencies (optional, default []) +# * include - include_directories (optional, default []) +# * link_with - compiled libraries to link with (optional, default []) + +tests =3D [] + +foreach data : tests + test_sources =3D '@0@.c'.format(data['name']) + test_bin =3D executable( + data['name'], + [ + data.get('sources', test_sources), + dtrace_gen_objects, + ], + c_args: [ + data.get('c_args', []), + ], + dependencies: [ + tests_dep, + data.get('deps', []), + ], + include_directories: [ + data.get('include', []), + ], + link_args: [ + libvirt_no_indirect, + ], + link_with: [ + libvirt_lib, + test_utils_lib, + data.get('link_with', []), + ], + export_dynamic: true, + ) + test(data['name'], test_bin, env: tests_env) +endforeach --=20 2.26.2