From nobody Sun Feb 8 05:37: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=1594893656; cv=none; d=zohomail.com; s=zohoarc; b=nKYDmqs1L3ualbiB88GolJ6e0NtwsslVo/Ihycwmlf1jRlNa7dPK6knYd6Gw2dwd3w8TgAGQT4PfOHlOJkzSdOOzJNH5lQg4SWeUmGCTuQoS8LQ5ocyw1uHb5pV+IXatzqwwsghEftfIruMcSl8QWeHm7C1NY+CkPg/3ocM2cdY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893656; 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=rDnwlOzGkuPLISJgkeT96svxygilXr0AvXRZ3J+0ZLQ=; b=YFVdGA8i1pH9KOayYHWE/QYkjZMw5PE3Ns4LnugTLzLNmlWbh39bEHL+EqpqdeeC86IjRt0/O4HeLnF+r32I2nUIjGP0V9I80++wU5bbBRbMlZkQN5MpT0TIRSkfdf/Gxdwwid036olPPfkgVVbyUhECQ6wgXJ5HJ3uiFwexzcg= 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 1594893656871657.9258777080341; Thu, 16 Jul 2020 03:00:56 -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-319-juVEv4bNPiupYG98wBsWXQ-1; Thu, 16 Jul 2020 06:00:51 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C743C18A1E05; Thu, 16 Jul 2020 10:00:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A992574F64; Thu, 16 Jul 2020 10:00:43 +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 71C46180530E; Thu, 16 Jul 2020 10:00:43 +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 06GA0ZmY015336 for ; Thu, 16 Jul 2020 06:00:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id 513312B6DC; Thu, 16 Jul 2020 10:00:35 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id C00C02DE69 for ; Thu, 16 Jul 2020 10:00:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893654; 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=rDnwlOzGkuPLISJgkeT96svxygilXr0AvXRZ3J+0ZLQ=; b=eS2FZmnxl+gjdeSX+Ws7su9jVlDVYTa6awYQDuEJFnheiC2UA0iGfkkYrx6J02jXaRv5EU UUxx80evW7NHUlAQss3wac0yA320lBcFVjtOOtUZw3NzArCmkMgkhH6wT+UjwZVCitktxQ eG6o3gCbmBHLdMuz63jqtHPVZBgcZzo= X-MC-Unique: juVEv4bNPiupYG98wBsWXQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 016/351] meson: add test_suite build option Date: Thu, 16 Jul 2020 11:54:12 +0200 Message-Id: <464eecb4a4c71244f2c498dd1a31fe99a8ec147e.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.13 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" With autoconf this option controlled if the test suite is compiled by default or not with the fact that it will be compiled later when running `make check`. With meson it is not possible to compile it later when running `ninja test` as it will be always compiled if referenced by `test()` function in meson.build files. Because of that enable the test suite be default. Enabling it only when compiling from git makes the test suite disabled for `ninja dist` command which builds the code from non-git location. Since that command is closest equivalent of `make distcheck` which runs the test suite. The only drawback from the autoconf state is that users compiling libvirt from tarball will compile the test suite as well even though they will not run it in most cases. Signed-off-by: Pavel Hrdina --- configure.ac | 17 ----------------- meson.build | 5 +++++ meson_options.txt | 1 + 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 66fc88bd014..71766f2fe61 100644 --- a/configure.ac +++ b/configure.ac @@ -616,23 +616,6 @@ if test -z "$PERL"; then AC_MSG_ERROR(['perl' binary is required to build libvirt]) fi =20 -LIBVIRT_ARG_WITH([TEST_SUITE], [build test suite by default], [check]) -case "$with_test_suite" in - yes|no|check) ;; - *) AC_MSG_ERROR([bad value ${withval} for tests option]) ;; -esac - -AC_MSG_CHECKING([Whether to build test suite by default]) -if test "$with_test_suite" =3D "check" ; then - if test -d $srcdir/.git ; then - with_test_suite=3Dyes - else - with_test_suite=3Dno - fi -fi -AC_MSG_RESULT([$with_test_suite]) -AM_CONDITIONAL([WITH_TESTS], [test "$with_test_suite" =3D "yes"]) - LIBVIRT_ARG_ENABLE([EXPENSIVE_TESTS], [set the default for enabling expensive tests ] [(long timeouts), use VIR_TEST_EXPENSIVE to ] diff --git a/meson.build b/meson.build index 633db2df51a..fee75204d27 100644 --- a/meson.build +++ b/meson.build @@ -124,6 +124,11 @@ if packager_version !=3D '' endif =20 =20 +# test options + +use_test_suite =3D get_option('test_suite') + + # figure out libvirt version strings =20 arr_version =3D meson.project_version().split('.') diff --git a/meson_options.txt b/meson_options.txt index 2281faec429..6973b9f6587 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,3 +3,4 @@ option('packager', type: 'string', value: '', description: = 'Extra packager name' option('packager_version', type: 'string', value: '', description: 'Extra = packager version') option('system', type: 'boolean', value: false, description: 'Set install = paths to system ones') option('runstatedir', type: 'string', value: '', description: 'State direc= tory for temporary sockets, pid files, etc') +option('test_suite', type: 'boolean', value: true, description: 'Whether t= o enable and build test suite by default') --=20 2.26.2