From nobody Sun Feb 8 19:59:47 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=1689672738; cv=none; d=zohomail.com; s=zohoarc; b=eV8FGloiAXoHHp4OiEE4mCrrVDXrXBBakINTbdYNemkhKj+q+RKiMITgzdkCNO5Tgtj7hyhBM6tFZDXr1PNv8Kx3I2h0ehT6T1LSJ8rTuRmBXZfTguy9YB8qAQHyv1Du5jMOAcmTwa4WBuoYt1V4BEW6M0AK9+aGjnWAXWQIQ4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689672738; h=Content-Type: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=zHSH2f6sNdUL3OXSLvMYszb1rthfkO1fWtFRariBUVA=; b=gyc+Bgs2PDNsJE6Rlx07txQNBtSgVTUh6GVt+TBWWZBqlHDBtVzwrOef9oWWZjTMPE6eWGWno1wycztxMMyEl42GRmh5Yy8T4gc7TDvI/VYsNRTgl3Yfb6A7do6lKulVPbRcA7BiPBVoOFa5ap05mfBbbT/UOjaYprRObPAK/VA= 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 1689672738889390.93915767263525; Tue, 18 Jul 2023 02:32:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLh2o-00042c-Fw; Tue, 18 Jul 2023 05:30:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLh2m-00041m-MK for qemu-devel@nongnu.org; Tue, 18 Jul 2023 05:30:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLh2l-0004F4-By for qemu-devel@nongnu.org; Tue, 18 Jul 2023 05:30:56 -0400 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-479-1NP3Kue-NDSFO3gg-_bjBg-1; Tue, 18 Jul 2023 05:30:51 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C94202A59542; Tue, 18 Jul 2023 09:30:50 +0000 (UTC) Received: from thuth.com (unknown [10.39.193.89]) by smtp.corp.redhat.com (Postfix) with ESMTP id D424D2166B25; Tue, 18 Jul 2023 09:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689672654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zHSH2f6sNdUL3OXSLvMYszb1rthfkO1fWtFRariBUVA=; b=LecodnJgV7BL/Nsr+Xqf6v9x0wH/K4hTW77FiHfv7HcPPBNdTMmP74F+ZSg5I3WTrGjKqB x85y7tHvKYML4Hw4yrHdBb8H64Ons/ocLArr145TY98Xdq0ttDDMMF50+l/UxGZxC2G8IC 8LO2HPDHAOjSOR/Ar2goTvTXsWP5Ie0= X-MC-Unique: 1NP3Kue-NDSFO3gg-_bjBg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PULL 6/8] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper Date: Tue, 18 Jul 2023 11:30:38 +0200 Message-Id: <20230718093040.172145-7-thuth@redhat.com> In-Reply-To: <20230718093040.172145-1-thuth@redhat.com> References: <20230718093040.172145-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689672740823100001 From: Philippe Mathieu-Daud=C3=A9 Add the get_qemu_packages_from_lcitool_json() helper which return such package list from a lcitool env var file in JSON format. Suggested-by: Daniel P. Berrang=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Message-Id: <20230711144922.67491-4-philmd@linaro.org> Signed-off-by: Thomas Huth --- tests/vm/basevm.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 23229e23d1..a97e23b0ce 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -27,6 +27,7 @@ import multiprocessing import traceback import shlex +import json =20 from qemu.machine import QEMUMachine from qemu.utils import get_info_usernet_hostfwd_port, kvm_available @@ -501,6 +502,16 @@ def gen_cloud_init_iso(self): stderr=3Dself._stdout) return os.path.join(cidir, "cloud-init.iso") =20 + def get_qemu_packages_from_lcitool_json(self, json_path=3DNone): + """Parse a lcitool variables json file and return the PKGS list.""" + if json_path is None: + json_path =3D os.path.join( + os.path.dirname(__file__), "generated", self.name + ".json" + ) + with open(json_path, "r") as fh: + return json.load(fh)["pkgs"] + + def get_qemu_path(arch, build_path=3DNone): """Fetch the path to the qemu binary.""" # If QEMU environment variable set, it takes precedence --=20 2.39.3