From nobody Mon Feb 9 04:45:00 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1652400672; cv=none; d=zohomail.com; s=zohoarc; b=dIGtbZcBXT2s+jvH6l0SLU9vTncNn7X3NHprBPX7YjKukb21ooghKsjMukp6EFP9hiY99kXunGjJjT7ucLYAcWD5W/Stlok5ZdboexZnUID4iLwIdUz3xfo0MtFcI5Q7bt8Hv83U+gBt9t3T8HzPgdJt5CdcwizYiDno29XxNOI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652400672; h=Content-Transfer-Encoding:Cc: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=HOJMbiUnopmGM1dRC1dc/YvTedKqIIqVE73B8Mo8sqs=; b=lidBuzmfjap0IPOD80uesIlB95y/TXoFqTlrdQg6g6W8wRSyMDaksvXTDqdr+0dIgLaRuS+p6a0ub5ZWtuxgppjtUe5OraBhXrEX/PyEhnU/J1ZqjXZfc2XYXpA4/tvm8NZgnxxkimG2FHEka7R9Lmi8GLcvx69dCHYVzjiWu/o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1652400672606141.44837768683442; Thu, 12 May 2022 17:11:12 -0700 (PDT) Received: from localhost ([::1]:45688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npItj-0007TZ-Km for importer@patchew.org; Thu, 12 May 2022 20:11:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npIp4-0007IN-S3 for qemu-devel@nongnu.org; Thu, 12 May 2022 20:06:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npIp2-0007lo-MH for qemu-devel@nongnu.org; Thu, 12 May 2022 20:06:22 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-208-3JErJMvCN-u-v8dCFuXqlg-1; Thu, 12 May 2022 20:06:16 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 548458015BA; Fri, 13 May 2022 00:06:16 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.8.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id B1F3315341CE; Fri, 13 May 2022 00:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652400380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HOJMbiUnopmGM1dRC1dc/YvTedKqIIqVE73B8Mo8sqs=; b=HMOO0WXLEOYZAjwzmGeA6Lfk0LWzMHEYedMWvOb/D1AEpO3Q0IV1IiLCf3luNn4VNjSSJO qjQJYOE5t27rh7seeBnVJggs84V3FAP2jurHWbZmldCr/VsTi9O8ezm9i/HaazKXrjxQp+ Wke6RHJs2dybKL0mk13rVeJ2KhKCd0g= X-MC-Unique: 3JErJMvCN-u-v8dCFuXqlg-1 From: John Snow To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Hanna Reitz , Thomas Huth , Daniel Berrange , Kevin Wolf , John Snow , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal Subject: [RFC PATCH 2/9] tests: add "TESTS_PYTHON" variable to Makefile Date: Thu, 12 May 2022 20:06:02 -0400 Message-Id: <20220513000609.197906-3-jsnow@redhat.com> In-Reply-To: <20220513000609.197906-1-jsnow@redhat.com> References: <20220513000609.197906-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652400674184100001 Content-Type: text/plain; charset="utf-8" This is a convenience feature: $(PYTHON) points to the Python executable we were instructed to use by the configure script. We use that Python to create a virtual environment with the "check-venv" target in tests/Makefile.include. $(TESTS_PYTHON) points to the Python executable belonging to the virtual environment tied to the build. This Python executable is a symlink to the binary used to create the venv, which will be the version provided at configure time. Using $(TESTS_PYTHON) therefore uses the $(PYTHON) executable, but with paths modified to use packages installed to the venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ec84b2ebc04..146aaa96a00 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,6 +89,7 @@ TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.= fa, $(ninja-targets))) TESTS_VENV_DIR=3D$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=3D$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results +TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python ifndef AVOCADO_TESTS AVOCADO_TESTS=3Dtests/avocado endif @@ -108,7 +109,7 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(PYTHON) -m venv $@, \ VENV, $@) $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV= _REQ), \ + $(TESTS_PYTHON) -m pip -q install -r $(TESTS_VENV_REQ), \ PIP, $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 @@ -126,7 +127,7 @@ FEDORA_31_DOWNLOAD=3D$(filter $(FEDORA_31_ARCHES),$(FED= ORA_31_ARCHES_CANDIDATES)) # download one specific Fedora 31 image get-vm-image-fedora-31-%: check-venv $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado vmimage get \ + $(TESTS_PYTHON) -m avocado vmimage get \ --distro=3Dfedora --distro-version=3D31 --arch=3D$*, \ "AVOCADO", "Downloading avocado tests VM image for $*") =20 @@ -135,7 +136,7 @@ get-vm-images: check-venv $(patsubst %,get-vm-image-fed= ora-31-%, $(FEDORA_31_DOW =20 check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado \ + $(TESTS_PYTHON) -m avocado \ --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ --filter-by-tags-include-empty-key) \ --=20 2.34.1