From nobody Sun May 5 03:44:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 205.139.110.61 is neither permitted nor denied by domain of redhat.com) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=none (zohomail.com: 205.139.110.61 is neither permitted nor denied by domain of redhat.com) 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=1597758276; cv=none; d=zohomail.com; s=zohoarc; b=RcAXDcF0wYrPmT37lOj72Ri4s0fvJ1w16RTsmCSEfUiDv2fcq03U8GVF5cvHzPUmN4Gcw+a7zIm3TJzxka6PuVSDNKYIuYGaklpDfgmdOeI+ukJSjsYSg5A7azNOkV1oIimQC4wtPjA+9WdQYkfUIjV46fNTIL4cRVPodDJRQYM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597758276; 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=UcIkj3J9mDSHvK6WtxRQsAjWy0CtotsH+xLAC+ZM03U=; b=mgTfTtfGDn8SS4MF9SZgxEilbGg9X62CmqotNaV+chgZbIfwlnW9Aj5CU+Jlkys7wfIXel2saD5+6q6Z1iAqcwWGCgzTXnRrPTh5sZYv3w1mHZEn0V34Ycs1FohGoG/dmAbc6MvcZNXnlOhuUGbPHx+uevyXvpMA7myTyyLRLIw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=none (zohomail.com: 205.139.110.61 is neither permitted nor denied by domain of redhat.com) 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1597758276166308.64909178144967; Tue, 18 Aug 2020 06:44:36 -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-22-nqmofVv0NNuYzUshJ-B7Vw-1; Tue, 18 Aug 2020 09:44:32 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 727D781F036; Tue, 18 Aug 2020 13:44:23 +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 B7207756BD; Tue, 18 Aug 2020 13:44:22 +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 F3A8F6034C; Tue, 18 Aug 2020 13:44:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07IDiIJV028572 for ; Tue, 18 Aug 2020 09:44:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 877BA5C896; Tue, 18 Aug 2020 13:44:18 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id F22545C88D for ; Tue, 18 Aug 2020 13:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597758275; 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=UcIkj3J9mDSHvK6WtxRQsAjWy0CtotsH+xLAC+ZM03U=; b=OLyEGvIyDXZuuDgWn8oQhYdZJ5cJZEMYzhyyJvZf1OPuYSJyNJGxiEsJ+kORqjjlZle/YB OR9rzYDAkUpSaj7O/bdhmOrjocvt/uFv/4ZmGptqOaqpehEIkw85FKZtLuMbYDn4eV/5rP q79B3qfJUNuGNBe5K5s4sU85QOLKJAI= X-MC-Unique: nqmofVv0NNuYzUshJ-B7Vw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] src/meson: introduce srcdir and builddir into augeas_test_data dictionary Date: Tue, 18 Aug 2020 15:44:09 +0200 Message-Id: <264a1e5e836bf6d24a4677021a7b28b77fb96ba9.1597758182.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.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" This will be used later to specify different include directories for augparse binary to run augeas tests. Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- src/meson.build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/meson.build b/src/meson.build index b1c9993bc0..96ec3e2675 100644 --- a/src/meson.build +++ b/src/meson.build @@ -689,6 +689,8 @@ endforeach # each entry is a dictionary with following items: # * name: daemon name to run the test for (required) # * file: test file to use (required) +# * srcdir: path to source dir with aug files (required) +# * builddir: path to build dir with aug files (required) augeas_test_data =3D [] =20 foreach data : virt_daemon_confs @@ -753,7 +755,12 @@ foreach data : virt_daemon_confs install: true, install_dir: virt_test_aug_dir, ) - augeas_test_data +=3D { 'name': data['name'], 'file': augeas_test_file } + augeas_test_data +=3D { + 'name': data['name'], + 'file': augeas_test_file, + 'srcdir': meson.current_source_dir(), + 'builddir': meson.current_build_dir(), + } endforeach =20 =20 @@ -960,8 +967,8 @@ if augparse_prog.found() 'check-augeas-@0@'.format(data['name']), augparse_prog, args: [ - '-I', meson.current_source_dir(), - '-I', meson.current_build_dir(), + '-I', data['srcdir'], + '-I', data['builddir'], data['file'].full_path(), ], ) --=20 2.26.2 From nobody Sun May 5 03:44:03 2024 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 207.211.31.81 is neither permitted nor denied by domain of redhat.com) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=none (zohomail.com: 207.211.31.81 is neither permitted nor denied by domain of redhat.com) 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=1597758274; cv=none; d=zohomail.com; s=zohoarc; b=cU0/YdX3XUWukdYvMahygWsOIWkeoCD9xIkcd6M8BzSFeyul2zUNT8BNi9eY0HgNBmskbFyjbrAb4PEew6+KWcdMgxjef2yXcLnaW55qGi6b1JkDGQQB0RBM6XqYdiyx3EzJpl7gqshwOgij+Yt8VFn0tzeL4GeJpkZkAv+spJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597758274; 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=dDYQCwkLJnsllUiCYxVPDEFDIWSGHKLGtbcR6dyC4p8=; b=iaH1vY/7KNsrYCmsu9OxT+BfaGBTvRunf19Xh5TjwKsXs6hhGYAVtC7ZOdxCGLBvsNSlcA/kTDl7yrO0AZm3Gk99dqvLTTijq3qcQyqtJZcBtzFqUJRBWj9UmTviv+bujIrPjUxN7+lYLE+UBwYPVTQDGFC0WoCz0DIUYI//76Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=none (zohomail.com: 207.211.31.81 is neither permitted nor denied by domain of redhat.com) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1597758274301631.1093133895531; Tue, 18 Aug 2020 06:44:34 -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-491-ahEprQq7NCC8LDdjCb129A-1; Tue, 18 Aug 2020 09:44:31 -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 8CE008ECCC9; Tue, 18 Aug 2020 13:44:25 +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 61B5F5D98F; Tue, 18 Aug 2020 13:44:25 +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 2AF3B6036A; Tue, 18 Aug 2020 13:44:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 07IDiOOm028591 for ; Tue, 18 Aug 2020 09:44:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D0275C896; Tue, 18 Aug 2020 13:44:24 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.66]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB5C75C88D for ; Tue, 18 Aug 2020 13:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597758273; 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=dDYQCwkLJnsllUiCYxVPDEFDIWSGHKLGtbcR6dyC4p8=; b=b+VKyMlOMoKqXHEk2uOSY60i+5aQlH6QKZEIKPpNPzkxy+Ys8LugE4NDxcEaiBy1G8OMId D0uTmx8nbq5a7y0gtBShvH+xaygiFmf0Xpbe1QTtpDx0laUvjUeWs33AHgsFF1wEQxbTl4 3elFUI88qo6NTa6I9CI4XhYHZGreqMs= X-MC-Unique: ahEprQq7NCC8LDdjCb129A-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] meson/src: add missing augeas tests Date: Tue, 18 Aug 2020 15:44:10 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Most of our augeas files are generated during meson setup into build directory and we were running augeas tests only for these files. However, we have some other augeas and config files that are not modified during meson setup and they are only in source directories. In order to run tests for these files we need to provide different path to both source and build directories. Reported-by: Michal Privoznik Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- src/bhyve/meson.build | 3 +++ src/libxl/meson.build | 3 +++ src/locking/meson.build | 9 +++++++++ src/logging/meson.build | 3 +++ src/lxc/meson.build | 3 +++ src/meson.build | 39 ++++++++++++++++++++++++--------------- src/qemu/meson.build | 3 +++ 7 files changed, 48 insertions(+), 15 deletions(-) diff --git a/src/bhyve/meson.build b/src/bhyve/meson.build index 643e72680e..7d54718820 100644 --- a/src/bhyve/meson.build +++ b/src/bhyve/meson.build @@ -53,6 +53,9 @@ if conf.has('WITH_BHYVE') 'name': 'test_libvirtd_bhyve.aug', 'aug': files('test_libvirtd_bhyve.aug.in'), 'conf': files('bhyve.conf'), + 'test_name': 'libvirtd_bhyve', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_daemon_confs +=3D { diff --git a/src/libxl/meson.build b/src/libxl/meson.build index 7afde2f81f..3bb6cc5f2e 100644 --- a/src/libxl/meson.build +++ b/src/libxl/meson.build @@ -54,6 +54,9 @@ if conf.has('WITH_LIBXL') 'name': 'test_libvirtd_libxl.aug', 'aug': files('test_libvirtd_libxl.aug.in'), 'conf': files('libxl.conf'), + 'test_name': 'libvirtd_libxl', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_daemon_confs +=3D { diff --git a/src/locking/meson.build b/src/locking/meson.build index a67a41298b..8a28310e40 100644 --- a/src/locking/meson.build +++ b/src/locking/meson.build @@ -186,6 +186,9 @@ if conf.has('WITH_LIBVIRTD') 'name': 'test_libvirt_lockd.aug', 'aug' : files('test_libvirt_lockd.aug.in'), 'conf': qemu_lockd_conf, + 'test_name': 'libvirt_lockd', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } endif =20 @@ -212,6 +215,9 @@ if conf.has('WITH_LIBVIRTD') 'name': 'test_libvirt_sanlock.aug', 'aug' : files('test_libvirt_sanlock.aug.in'), 'conf': qemu_sanlock_conf, + 'test_name': 'libvirt_sanlock', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } endif =20 @@ -231,6 +237,9 @@ if conf.has('WITH_LIBVIRTD') 'name': 'test_virtlockd.aug', 'aug': files('test_virtlockd.aug.in'), 'conf': files('virtlockd.conf'), + 'test_name': 'virtlockd', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_install_dirs +=3D [ diff --git a/src/logging/meson.build b/src/logging/meson.build index 1f06a51e93..996d4265fc 100644 --- a/src/logging/meson.build +++ b/src/logging/meson.build @@ -77,6 +77,9 @@ if conf.has('WITH_LIBVIRTD') 'name': 'test_virtlogd.aug', 'aug': files('test_virtlogd.aug.in'), 'conf': files('virtlogd.conf'), + 'test_name': 'virtlogd', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_daemon_units +=3D { diff --git a/src/lxc/meson.build b/src/lxc/meson.build index 11526b637b..2810da7604 100644 --- a/src/lxc/meson.build +++ b/src/lxc/meson.build @@ -154,6 +154,9 @@ if conf.has('WITH_LXC') 'name': 'test_libvirtd_lxc.aug', 'aug': files('test_libvirtd_lxc.aug.in'), 'conf': files('lxc.conf'), + 'test_name': 'libvirtd_lxc', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_daemon_confs +=3D { diff --git a/src/meson.build b/src/meson.build index 96ec3e2675..73ac99f01e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -173,6 +173,9 @@ virt_aug_files =3D [] # * name - augeas test file name (required) # * aug - augeas test file source (required) # * conf - conf file (required) +# * test_name: name for the check-augeas test (required) +# * test_srcdir: path to source dir with aug files (required) +# * test_builddir: path to build dir with aug files (required) virt_test_aug_files =3D [] =20 # virt_daemon_confs: @@ -670,21 +673,6 @@ virt_conf_files +=3D 'libvirt.conf' install_data(virt_conf_files, install_dir: confdir) install_data(virt_aug_files, install_dir: virt_aug_dir) =20 -foreach data : virt_test_aug_files - custom_target( - data['name'], - input: [ data['conf'], data['aug'] ], - output: data['name'], - command: [ - meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(), - '@INPUT@', - ], - capture: true, - install: true, - install_dir: virt_test_aug_dir, - ) -endforeach - # augeas_test_data: # each entry is a dictionary with following items: # * name: daemon name to run the test for (required) @@ -693,6 +681,27 @@ endforeach # * builddir: path to build dir with aug files (required) augeas_test_data =3D [] =20 +foreach data : virt_test_aug_files + augeas_test_file =3D custom_target( + data['name'], + input: [ data['conf'], data['aug'] ], + output: data['name'], + command: [ + meson_python_prog, python3_prog.path(), augeas_gentest_prog.path(), + '@INPUT@', + ], + capture: true, + install: true, + install_dir: virt_test_aug_dir, + ) + augeas_test_data +=3D { + 'name': data['test_name'], + 'file': augeas_test_file, + 'srcdir': data['test_srcdir'], + 'builddir': data['test_builddir'], + } +endforeach + foreach data : virt_daemon_confs capitalize_args =3D [ '-c', 'print("@0@".capitalize())'.format(data['nam= e']) ] name_uc =3D run_command(python3_prog, capitalize_args, check: true).stdo= ut().strip() diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 7faba16049..72c1a8c665 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -132,6 +132,9 @@ if conf.has('WITH_QEMU') 'name': 'test_libvirtd_qemu.aug', 'aug': files('test_libvirtd_qemu.aug.in'), 'conf': files('qemu.conf'), + 'test_name': 'libvirtd_qemu', + 'test_srcdir': meson.current_source_dir(), + 'test_builddir': meson.current_build_dir(), } =20 virt_helpers +=3D { --=20 2.26.2