From nobody Mon Feb 9 21:36:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1698253646; cv=none; d=zohomail.com; s=zohoarc; b=OywJEd2L8yzyQEcRvaqw9hfu99rCSVbsbRjIqT3t1Y7wR5TmOLHj7UU9t+26LR+WOeGyM457Y5NLTYI4RbT6LTwXRZ/pJn1nWf/fFxmQMnZxNyfC4T17s9ovOgOfxsA4uQ0HQft4p/vhv4hhVxlxGXzJNzRIJo+jLuzJBvjmLPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698253646; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=rrBoETI3lx8VDP5QyxSjP/6Ch0IAGJrLHCF0FWsE9RU=; b=S/UxaOBfB+L34+VDkBj3ZGjUqpFkyxYB6D4vi56axNrQudAyDWWOzCV4BFE6SLr4V2yUsWLn6lUbaoQnqTaPIEZn8fINvChkEDRW/I44JGOmPDs0WcJDqi80+i8AC9PiR0hy1bwKnBxUlPCiprFQrT9QiiVnBHlpZHs2GT9YkM0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1698253645807219.76295675432686; Wed, 25 Oct 2023 10:07:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-187-iyZ7rohXOX6mQtnWsRVCvA-1; Wed, 25 Oct 2023 13:07:19 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7BF72810D42; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CDB391C060B0; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A1313194658D; Wed, 25 Oct 2023 17:07:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E738A19466EF for ; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id CDEE5492BE8; Wed, 25 Oct 2023 17:07:12 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D10DC492BE7 for ; Wed, 25 Oct 2023 17:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698253644; 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=rrBoETI3lx8VDP5QyxSjP/6Ch0IAGJrLHCF0FWsE9RU=; b=EM8FcDbnCtuYVnAzg/SHDNc1ZKVF2m9CaK9cxVMHhAScyh9pIuJ6dEaOSiusMpZF6UvEoa erV5g3xL280PHiOEc1EceM7Ep9cxbZ2EQUW8S8DtwyXGRGBVv9qLolgoTB7wOmqAYyKT9i 1MfkKvYhDtWZ7LdpIwaSYWG1zPgDo2g= X-MC-Unique: iyZ7rohXOX6mQtnWsRVCvA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH v2 4/8] meson: Move all handling of test options together Date: Wed, 25 Oct 2023 19:06:57 +0200 Message-ID: <20231025170701.239137-5-abologna@redhat.com> In-Reply-To: <20231025170701.239137-1-abologna@redhat.com> References: <20231025170701.239137-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698253647378100005 Content-Type: text/plain; charset="utf-8"; x-default="true" This will make future patches nicer. Note that we need to handle these somewhat late because of the dependency on information about the compiler and the flags it supports. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik --- meson.build | 57 +++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/meson.build b/meson.build index 47748febb8..a372f99c21 100644 --- a/meson.build +++ b/meson.build @@ -151,23 +151,6 @@ if packager_version !=3D '' endif =20 =20 -# test options - -if get_option('expensive_tests').auto() - use_expensive_tests =3D not git -else - use_expensive_tests =3D get_option('expensive_tests').enabled() -endif - -coverage_flags =3D [] -if get_option('test_coverage') - coverage_flags =3D [ - '-fprofile-arcs', - '-ftest-coverage', - ] -endif - - # Add RPATH information when building for a non-standard prefix, or # when explicitly requested to do so =20 @@ -2041,6 +2024,35 @@ endif =20 conf.set_quoted('TLS_PRIORITY', get_option('tls_priority')) =20 + +# test options + +build_tests =3D [ not get_option('tests').disabled() ] +if build_tests[0] and \ + cc.get_id() =3D=3D 'clang' and \ + not supported_cc_flags.contains('-fsemantic-interposition') \ + and get_option('optimization') !=3D '0' + # If CLang doesn't support -fsemantic-interposition then our + # mocking doesn't work. The best we can do is to not run the + # test suite. + build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] +endif + +if get_option('expensive_tests').auto() + use_expensive_tests =3D not git +else + use_expensive_tests =3D get_option('expensive_tests').enabled() +endif + +coverage_flags =3D [] +if get_option('test_coverage') + coverage_flags =3D [ + '-fprofile-arcs', + '-ftest-coverage', + ] +endif + + # Various definitions =20 # Python3 < 3.7 treats the C locale as 7-bit only. We must force env vars = so @@ -2064,17 +2076,6 @@ subdir('src') =20 subdir('tools') =20 -build_tests =3D [ not get_option('tests').disabled() ] -if build_tests[0] and \ - cc.get_id() =3D=3D 'clang' and \ - not supported_cc_flags.contains('-fsemantic-interposition') \ - and get_option('optimization') !=3D '0' - # If CLang doesn't support -fsemantic-interposition then our - # mocking doesn't work. The best we can do is to not run the - # test suite. - build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] -endif - if build_tests[0] subdir('tests') endif --=20 2.41.0