From nobody Sun Feb 8 17:04:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.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 205.139.110.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=1594895105; cv=none; d=zohomail.com; s=zohoarc; b=XeC9m86re+VuJlF1CUkstnesi78/B449cdGr7kXjF91PqvN0uckGhehsBk/e9+ySvAuJxxl6YuJ360nr2ir/IVde9xwlHLLrM28joSpAcmfJuV4rN4C4es5Pw6xxQHbRD02NH7ZiAIjwXXARk2R2IHArOF0hZzVuu+yVW05HfdM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594895105; 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=i/G4Kd/SRYTi7IA9AD4Qen8FPANKnqLhZIPit/IY87g=; b=SNLdUCZJsi+8bHFpUGXR6T6vmbaOwBzFdm69j3wKjlU27knIQZvFbUl4TppmJ38kdG7nz0qlxGw3s79IKqtfmva8ZVsYZeLzgtA7lywTVq7NDKP4+9sV+BMEG0KZfXqXZ5h5mbuVGb7ixEN/u/48Kz50vgD/vCGUT1EV0YIXPFU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.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 [205.139.110.120]) by mx.zohomail.com with SMTPS id 1594895105975403.5007176883604; Thu, 16 Jul 2020 03:25:05 -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-217-A0ppNt7PMci1ENW-6Oe7dA-1; Thu, 16 Jul 2020 06:08:48 -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 2AC281888AC8; Thu, 16 Jul 2020 10:08:42 +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 0C989710D7; Thu, 16 Jul 2020 10:08:42 +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 D2E36730F5; Thu, 16 Jul 2020 10:08:41 +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 06GA65mE019321 for ; Thu, 16 Jul 2020 06:06:05 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5434D2B6DB; Thu, 16 Jul 2020 10:06:05 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id C28862B6E6 for ; Thu, 16 Jul 2020 10:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594895104; 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=i/G4Kd/SRYTi7IA9AD4Qen8FPANKnqLhZIPit/IY87g=; b=dfwpTOXI6JqeyZJJ8C0W9dONbVYSLc+/KW6lwPJyKTtMFApEa0tcgJZoCXETE62XGWMVLy hayCRsewnmaa5L7pGi1gZksGTpiNPWPjpLhhg4xobOxu1DoNby6FqNaJffbNGpszlYXOU7 WqsQ6w4mGQilL+m86Xga6RNVlaclwMs= X-MC-Unique: A0ppNt7PMci1ENW-6Oe7dA-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 246/351] meson: src: add check-augeas test Date: Thu, 16 Jul 2020 11:58:02 +0200 Message-Id: <3f5dd7a231615c3c7272c58c2ea6deb06876cdb0.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.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 --- scripts/check-augeas.sh | 12 ++++++++++++ scripts/meson.build | 1 + src/Makefile.am | 17 ----------------- src/meson.build | 18 +++++++++++++++++- 4 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 scripts/check-augeas.sh diff --git a/scripts/check-augeas.sh b/scripts/check-augeas.sh new file mode 100644 index 00000000000..68609d555a7 --- /dev/null +++ b/scripts/check-augeas.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +AUGPARSE=3D$1 +srcdir=3D$2 +builddir=3D$3 +augeastest=3D$4 + +set -vx + +for f in $augeastest; do + ${AUGPARSE} -I "$srcdir" -I "$builddir" $f +done diff --git a/scripts/meson.build b/scripts/meson.build index 3038dfc8d21..05bf6ff7231 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -3,6 +3,7 @@ scripts =3D [ 'augeas-gentest.py', 'check-aclperms.py', 'check-aclrules.py', + 'check-augeas.sh', 'check-driverimpls.py', 'check-drivername.py', 'check-file-access.py', diff --git a/src/Makefile.am b/src/Makefile.am index d697114d7e8..88e44fab2b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,8 +20,6 @@ # here. List them against the individual XXX_la_CFLAGS targets # that actually use them. =20 -augeas_DATA =3D -augeastest_DATA =3D if WITH_DTRACE_PROBES tapset_DATA =3D endif WITH_DTRACE_PROBES @@ -91,21 +89,6 @@ check-local: check-protocol \ .PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=3Dstruct) =20 =20 -check-local: check-augeas - -check-augeas: $(augeas_DATA) $(augeastest_DATA) - $(AM_V_GEN) \ - if test -x "$(AUGPARSE)"; then \ - for f in $(augeastest_DATA); do \ - DIR=3D$$(dirname "$$f"); \ - FILE=3D$$(basename "$$f"); \ - "$(AUGPARSE)" \ - -I "$(srcdir)/$$DIR" -I "$(builddir)/$$DIR" \ - "$$DIR/$$FILE" || exit 1; \ - done; \ - fi -.PHONY: check-augeas - if WITH_DTRACE_PROBES =20 tapset_DATA +=3D libvirt_functions.stp diff --git a/src/meson.build b/src/meson.build index 6747f11a3f3..9b4c26e32ea 100644 --- a/src/meson.build +++ b/src/meson.build @@ -646,6 +646,8 @@ foreach data : virt_test_aug_files ) endforeach =20 +augeas_test_data =3D [] + foreach data : virt_daemon_confs daemon_conf =3D configuration_data() daemon_conf.set('runstatedir', runstatedir) @@ -694,7 +696,7 @@ foreach data : virt_daemon_confs ) =20 test_aug_out =3D 'test_@0@.aug'.format(data['name']) - custom_target( + augeas_test_file =3D custom_target( test_aug_out, input: [ conf_out, test_aug_tmp ], output: test_aug_out, @@ -703,6 +705,7 @@ foreach data : virt_daemon_confs install: true, install_dir: virt_test_aug_dir, ) + augeas_test_data +=3D augeas_test_file endforeach =20 =20 @@ -857,3 +860,16 @@ test( args: [ check_aclrules_prog.path(), files('remote/remote_protocol.x'), s= tateful_driver_source_files ], env: runutf8, ) + +if augparse_prog.found() + test( + 'check-augeas', + check_augeas_prog, + args: [ + augparse_prog.path(), + meson.current_source_dir(), + meson.current_build_dir(), + augeas_test_data, + ], + ) +endif --=20 2.26.2