From nobody Sun Feb 8 20:28:26 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=1594894267; cv=none; d=zohomail.com; s=zohoarc; b=LTWHvv/BE6bczEmFsBtIW2K0RmQQt5dzdfxsMyvrh9ncEZvqWE2YwhY7FyRZQpxXwQrS57e4q3s2vJ1RSy/k5vbEBIC5turyPTsJCBJWCXGBQokhM988o3Za4K2aGHxRoSETQOVceGtjB3rCvKq8j+RbIOQJSMuy9ljtkT5DP24= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894267; 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=2JP2ATNKVZbfxVDibEyadjGHrVhFkhP7cHr/nck5hEo=; b=HSMrv1mGWPOboazClvTiNeBwNXc0uJrN1uGrmPE0muQOF7KN+nPvoEr4vApRKf6hS5NaQCg9+8IyM8zhK1LW3bc0V+GlU0hQ13JiB8Cw2W/B4Y8tDCSVZO9d4ey9+E3IOCAaFk7lfsJmE5Av7DG9mLg9QAaqDGj/E48r/QsmcBs= 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 1594894267626657.9733657009654; Thu, 16 Jul 2020 03:11:07 -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-443-ONhWChV7OXy7YRnHHaBbJQ-1; Thu, 16 Jul 2020 06:11:03 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D5E48027F2; Thu, 16 Jul 2020 10:10:58 +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 1A7D779501; Thu, 16 Jul 2020 10:10:58 +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 DBD7C10480D; Thu, 16 Jul 2020 10:10:57 +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 06GA7AoX020374 for ; Thu, 16 Jul 2020 06:07:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDBFC2DE69; Thu, 16 Jul 2020 10:07:10 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5892A2DE72 for ; Thu, 16 Jul 2020 10:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894266; 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=2JP2ATNKVZbfxVDibEyadjGHrVhFkhP7cHr/nck5hEo=; b=R3HOaGf+pY+7bKcUXGXH3W/7QK+5wK+95znbsRGEoa3KOJPmsy8A1he5uo2Q/rqv2RkLQ9 b3ym59hC+F4V99vfXGcPv26zib2y/hLhsLouT+SqDn5BWPvHn6RJ8way5UH6jW0pcj4A60 jb3SEa8IeBZewtnRw3/dQ6OXSl7xkTs= X-MC-Unique: ONhWChV7OXy7YRnHHaBbJQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 309/351] meson: tests: add helper binaries build support Date: Thu, 16 Jul 2020 11:59:05 +0200 Message-Id: <54ff52e0e78ddd590a9a59918099a5fccb11e5e1.1594891445.git.phrdina@redhat.com> 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.14 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/meson.build | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/meson.build b/tests/meson.build index 40acbcee6cd..ebf53891ec7 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -566,3 +566,37 @@ foreach data : tests ) test(data['name'], test_bin, env: tests_env) endforeach + + +# helpers: +# 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 []) +# * include - include_directories (optional, default []) +# * link_with - compiled libraries to link with (optional, default []) + +helpers =3D [] + +foreach data : helpers + helper_sources =3D '@0@.c'.format(data['name']) + helper_bin =3D executable( + data['name'], + [ + data.get('sources', helper_sources), + ], + c_args: [ + data.get('c_args', []), + ], + dependencies: [ + tests_dep, + ], + include_directories: [ + data.get('include', []), + ], + link_with: [ + data['link_with'], + ], + export_dynamic: true, + ) +endforeach --=20 2.26.2