From patchwork Tue Jul 11 14:01:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 701518 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5734850wrs; Tue, 11 Jul 2023 07:03:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/mJRlWnDZO+vCpwq0p3NWZPxMKXN+YemTQQ83bexcZ0fdVE2VISjU+IBQBUo02nNf62Me X-Received: by 2002:a0c:f3d4:0:b0:632:c2e:5795 with SMTP id f20-20020a0cf3d4000000b006320c2e5795mr15722498qvm.32.1689084182307; Tue, 11 Jul 2023 07:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084182; cv=none; d=google.com; s=arc-20160816; b=UPxPmeFID3ZsCyE+KMgn7k5GpKwTNJtzkhJxUCFWuUX8Eg3ggHpDUF1vLcQ2e+fk2W NS4YxrCkj5oK3VBlwgplvTwZbTqAUqtFkQTJ5WPxrIakcPIboOrxuszEInjaBdu0NV9v WHnjrojLMT3ytu0O4Lccb4bq+DqRY1RCsOD8TzYY1I2aKFGyRipBjc5dLFmrTeDvtxOE h5JtfN++AVrC0wudOeuu1eSorlOl6W06/ztSQ3UGyaPvlhGsPl1ZqCjovVSJ59UKMRvy pTE/dE3jk1qpvix3A0c/2Y0v7JUMkAqInrJQA4ayyt/rfBMDQUgiQfcGjC2ub7y/xeEn SbsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LsVbQDzTSwp+23NIUM9Hpbj8QGWieQ9A3lfiJDyMzDQ=; fh=MSW2xS6kFMMHYAUSI+aD2wAS9EV/Rh2umKkxXDlUZ4k=; b=myAMrwXRJ5fDOZuiaXkmrusR5jM8TlKtEhxzQW0f6wXDv7i5FEdzLLiBFRiQvdDwno sfJG2yaVLBnL0/hRkGjeCVTuXQQrNJR5IdGNFywb4I5oc4PFl8TMn+Eeoh+UQO8l3vw4 UlFOBv2dAcWtJhZ6uIjoC10I4Vn5UkLx4oV4jgrWc2nPn1DOM9VpBTAXM3nr+mNduh50 HdVa052pFYdQRx4VOFnXPFb/2GyphxIjvue7EfN28UtUh0MAIAdQ+WJJBoM38Q96QPFj GioboHt4Ap5Ie6VWcoxr1w9R7uV1KkPfeJi9SzpLaLiw4Kq+BAG61C79/CckYczU62Xu 7XyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hl0U7Fqd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p8-20020a0ccb88000000b0062f1f41c703si778562qvk.52.2023.07.11.07.03.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2023 07:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hl0U7Fqd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJDwL-00032T-P6; Tue, 11 Jul 2023 10:02:05 -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 1qJDwL-00032K-21 for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:05 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJDwF-000824-8e for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:04 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-99384a80af7so663339166b.2 for ; Tue, 11 Jul 2023 07:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689084113; x=1691676113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LsVbQDzTSwp+23NIUM9Hpbj8QGWieQ9A3lfiJDyMzDQ=; b=hl0U7FqdHFvQatIk6gV4ujDSFDkmcCg7wWRJ0losznKMW6BVtaUtGyF2Fp+10ZzHMZ FvJDFU+73ZRhS8kO6xXWHXeQclQ30bDHPBoQcf4lPOqc+xplG1w0Las9KwmG8YxuBBg9 CKcMlI11//4xA2W65GiRI6gxCcjwl+qSZb5PJPSLJWOh0osdYCg3GaO4M9lfzwTnQdA3 GZCv9qycuZTV+MadJfbl0yO9NJGm5MQ7G3wmI71R6EEw5Wq+yU9Pa3EnQNIT6ejfcbAe NwfbyPEd15X687B83U+ZKLhJUb358td7H+Wdnke49cWVnACgBTJpfLz5wRm5kSuAKkqp Ik4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689084113; x=1691676113; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LsVbQDzTSwp+23NIUM9Hpbj8QGWieQ9A3lfiJDyMzDQ=; b=EcDJDGIvuG4bnS5IO/Golf8t8AM4Iz+kqZ3+bUO23Sf11GpICZ9j/T+vjDePi0DhmK Y4U9V1C3pkRjxMsmPtgC7268Ue7sVzYCdZzNKGjgHZls1C0ZXXC0D11gX0v17FSnPj0a 3ckojqDp9EjukYVNwPcR+/x26+gkL5sMUqa3oRoKrYJ3mA0De6y6RoS8VsL/Z/qrgSXG qRQHZEn4oJN0nT/tUDlQ5EN36NFLbZJZw5+5V+vdnYqoMTUu59/Dr22uvzVwG8ptY9Qp 75b24mvPirAjRjF4vKdNtPqc8QZDBNplf6dyauE8kcMB8YoZWngwpZSnQXo/aEZESrsK ztYA== X-Gm-Message-State: ABy/qLYK54O3y/tVKEbpP+hcQ34qWEMfuClOgMzghqWobYD2A2MgoXlt ZfhIELpRg+6ObmjC3kOmfZb4exNqu9KoOrTMhHY= X-Received: by 2002:a17:906:51cd:b0:993:d6e8:2386 with SMTP id v13-20020a17090651cd00b00993d6e82386mr12185713ejk.16.1689084112929; Tue, 11 Jul 2023 07:01:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.194.156]) by smtp.gmail.com with ESMTPSA id c3-20020a17090603c300b009931baa0d44sm1229137eja.140.2023.07.11.07.01.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 11 Jul 2023 07:01:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Warner Losh , Wainer dos Santos Moschetta , Ed Maste , Beraldo Leal , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= , Li-Wen Hsu , Kyle Evans , =?utf-8?q?Alex_Benn=C3=A9e?= , Erik Skultety Subject: [PATCH v2 1/3] tests/lcitool: Generate distribution packages list in JSON format Date: Tue, 11 Jul 2023 16:01:41 +0200 Message-Id: <20230711140143.65818-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230711140143.65818-1-philmd@linaro.org> References: <20230711140143.65818-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add the generate_pkglist() helper to generate a list of packages required by a distribution to build QEMU. Generate the FreeBSD JSON file (based on FreeBSD 13). Suggested-by: Erik Skultety Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé --- tests/lcitool/refresh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh index b54566edcc..a5df096074 100755 --- a/tests/lcitool/refresh +++ b/tests/lcitool/refresh @@ -84,6 +84,12 @@ def generate_cirrus(target, trailer=None): generate(filename, cmd, trailer) +def generate_pkglist(vm, target): + filename = Path(src_dir, "tests", "vm", vm + ".json") + cmd = lcitool_cmd + ["variables", "--format", "json", target, "qemu"] + generate(filename, cmd, None) + + # Netmap still needs to be manually built as it is yet to be packaged # into a distro. We also add cscope and gtags which are used in the CI # test @@ -191,6 +197,11 @@ try: generate_cirrus("freebsd-13") generate_cirrus("macos-12") + # + # VM packages lists + # + generate_pkglist("freebsd", "freebsd-13") + sys.exit(0) except Exception as ex: print(str(ex), file=sys.stderr) From patchwork Tue Jul 11 14:01:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 701520 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5735016wrs; Tue, 11 Jul 2023 07:03:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlH4bQx2X2a6l4ngk8A008kGQSOj4d4p1Y+NxPmLdjOiVeFDGvUJlxfWocGC71JUcEMU/ntP X-Received: by 2002:a05:622a:1ba9:b0:400:8580:1025 with SMTP id bp41-20020a05622a1ba900b0040085801025mr7205468qtb.2.1689084193204; Tue, 11 Jul 2023 07:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084193; cv=none; d=google.com; s=arc-20160816; b=QqpmKh7vnh/tF6SuTB8o8PSkn+M05RdzHg9FCL97sVmuP9vEO6Q/bFDv+KFArdAJn5 7hv44+IK6pF2V8wBPMLBLSM+pwIA6b/mNPMRdC2S9WfJbxZmcVbsd8k99R1LiGokV8Vj 1sqyb9jsitPWhbL1U/Ysz1BcxE27saNYED4Q2ev8v2GxNXwut0EDusGweywZjY/f/s53 qUa6d9LVNmOGzXLVG0DSgsxD0cbWu4ShPjYmRbDudvlsx3n4Tmm2GCYFjdwZ/igN4ag0 6wqpI1naqvJBgF57+H8w11BR9n4Ni1JHt/d/xUT/9SinFICmN3upa8sYGdXfqQRMebjH 3VyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=w6XJhuOMcFFfDpDirnHeiG77aGS9ai0iI4+kwtvURXQ=; fh=MSW2xS6kFMMHYAUSI+aD2wAS9EV/Rh2umKkxXDlUZ4k=; b=Jv+nqk/vrfUFXcoh8gVZ7SDBgXBZv+rKNmOjBHVzp+uuZcNa8KfKXPO5LcNiPdbE0b 2FnhqgqTiQ7zyogqyxQrhU0hyI6DEGzlN/MdH6NpAJxibzwpt2ojFgiQ2vM5v7buM6NT j6Z0KxmZstDdZbYYvZxU/xRJiMFTkl/qLnYTvOMpxai3Zfi8SIHQdFCikxBhb4rU+cQu JR7Eh0TPrODIUVGK3YYE1Q0jeXwGZ+5SQRbqy+kq+4AdxjxEiQy1LttfrVBQMJcQdh/r O1wYWOl/AoMaPxw6pG1yzf7MvbzpwgC2Z/6gzdbxH2MS5PXQVF9JgCA+Qz7mz2Ic1EX1 w/qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TXCtY3rW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v34-20020a05622a18a200b004008c7f5283si890122qtc.261.2023.07.11.07.03.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2023 07:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TXCtY3rW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJDwR-00033f-FO; Tue, 11 Jul 2023 10:02:11 -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 1qJDwO-00033E-Nu for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:08 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJDwG-00083B-L7 for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:08 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-991f956fb5aso664514066b.0 for ; Tue, 11 Jul 2023 07:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689084119; x=1691676119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=w6XJhuOMcFFfDpDirnHeiG77aGS9ai0iI4+kwtvURXQ=; b=TXCtY3rWF5Lb+NBKB5eUj7K/dpSFaV3GPM/BVt/7B0Nnljv6r7d88b3lyRC3FDMX6Y i6V4zupPVY0MSWC+QLQvk+fCwlCR9K0w1UjES0B7VPG3vfpham7HVWbPKfevP4rwl+HK yBp6DIDjh6qJCg6bspgAYLa0fw+J4SLautLTvGzZ6CYoSRTyEYZcHrp76jqEtkZHY46U qmoVO/M9OY25Kn4qpC833yV5MhCEdUXPzPDCKGOZtkAu/9SPdz3K4jFxLNsjuU3HOmHv TXGXuCH7hohYwuvlOxfOVOaMh00EjAYkM1R5E+QE7WC4FGQO3uN+n2OZWd6L8/VDWHtv 48Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689084119; x=1691676119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w6XJhuOMcFFfDpDirnHeiG77aGS9ai0iI4+kwtvURXQ=; b=JLeccSm1MX1DvHA6hJ5Yvo1G7gSAvX8dkPYOiZjQZ+Hw7ck+ttG+bFvqGKKIBkyH18 7nqCiJAtiQbgwfaLyepnGWgvH78xobX+BzyG+l8ungeV0JnvfelQa/tXSP7T4upatWMG 5n9XSqkYtq713JwEfeQH4gLu1Gq+hYLUoEed1TSeCb39Kr9nay4XQzPF4ku3zXhcY7CU HFS4hTcBljclRtYcex1ZrjtoMvCdo0LEniKteFHX4Fp+hJQKFg3hNzdW0CFRh6QqqNxm aQ553iRvpIyU+RPHW994KRlZYQ/LKmrfx3citl7vEZJVMG2nZyrwyVBc8UNpzi613zQa zBfg== X-Gm-Message-State: ABy/qLZ83flIoIhEubUjJE+fneMSzJh7r9Qm7bpx66gnx68o3q51Beyy EYKovaiYY2AZsf41nPZ6tJYe4Z9yrZqB5/kSFLc= X-Received: by 2002:a17:906:253:b0:993:f349:c98c with SMTP id 19-20020a170906025300b00993f349c98cmr10315655ejl.4.1689084118784; Tue, 11 Jul 2023 07:01:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.194.156]) by smtp.gmail.com with ESMTPSA id e17-20020a1709062c1100b009930308425csm1214889ejh.31.2023.07.11.07.01.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 11 Jul 2023 07:01:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Warner Losh , Wainer dos Santos Moschetta , Ed Maste , Beraldo Leal , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= , Li-Wen Hsu , Kyle Evans , =?utf-8?q?Alex_Benn=C3=A9e?= , Erik Skultety Subject: [PATCH v2 2/3] tests/vm: Introduce get_qemu_packages_from_lcitool_json() helper Date: Tue, 11 Jul 2023 16:01:42 +0200 Message-Id: <20230711140143.65818-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230711140143.65818-1-philmd@linaro.org> References: <20230711140143.65818-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/Makefile.include | 4 ++++ tests/vm/basevm.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index c2a8ca1c17..b021b344b5 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -106,6 +106,10 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ --build-image $@, \ " VM-IMAGE $*") +$(SRC_PATH)/tests/vm/%.json: + $(call quiet-command, \ + make lcitool-refresh) + # Build in VM $(IMAGE) vm-build-%: $(IMAGES_DIR)/%.img $(VM_VENV) $(call quiet-command, \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 23229e23d1..cc4cc0a973 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -27,6 +27,7 @@ import multiprocessing import traceback import shlex +import json from qemu.machine import QEMUMachine from qemu.utils import get_info_usernet_hostfwd_port, kvm_available @@ -501,6 +502,14 @@ def gen_cloud_init_iso(self): stderr=self._stdout) return os.path.join(cidir, "cloud-init.iso") + def get_qemu_packages_from_lcitool_json(self, json_path=None): + """Parse a lcitool variables json file and return the PKGS list.""" + if json_path is None: + json_path = os.path.join(os.path.dirname(__file__), self.name + ".json") + with open(json_path, "r") as fh: + return json.load(fh)["pkgs"] + + def get_qemu_path(arch, build_path=None): """Fetch the path to the qemu binary.""" # If QEMU environment variable set, it takes precedence From patchwork Tue Jul 11 14:01:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 701519 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5734961wrs; Tue, 11 Jul 2023 07:03:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlEGlAhNilK/TBwH2hDQGI4RQsFIiFLxo/GoAlSqpk+DMvjG/nDgAE2vMGCqtW3Le0PmiDEL X-Received: by 2002:a05:620a:4546:b0:767:5748:cae7 with SMTP id u6-20020a05620a454600b007675748cae7mr21031433qkp.31.1689084189265; Tue, 11 Jul 2023 07:03:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084189; cv=none; d=google.com; s=arc-20160816; b=mJ72ftmxGRdOu0wMd+lnMhCjTv2VJCC7xH4rgbHDBUJPR6QJjSgasxzNppWkKj1RFf +492jKhP/LmkexiHoUlYrHfKwIpGyErKnVj8oAH47FD340Sf/NnMGI9/Lt8af0t12CEz 7L69x6F1hVzzwARxdSKj7QlnOwJX9jBSvsxsDDrsCerixjEK9u4bsVmxMlMVk8V4EVg8 uf13vDReAZZOElv0xUe0zBWhq+FcCqB/AAiy7E3k8N7pM1jzvZ2opH1hOmF1dGwNfoPV FMEyOlhlSt8czQTTze/BUpUFs1GWEEMi2hyJdAtcnNAeu3FeIllgbQkzFIFfsv8qxp7f Msjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4/go/SNx7o3UmNqsJvS9SSRzBMvZWAoewv5X6oINpyQ=; fh=MSW2xS6kFMMHYAUSI+aD2wAS9EV/Rh2umKkxXDlUZ4k=; b=P5a6AYef484CnjKtZSoPQ43n4ZjrIAdNo2jPUIw0WY9d2fULN72rIPI7OPF3+LtjPB nrs+WFyFwSVtOnEvTS1xtHvcPzfJkmuDHIXWLhAPJLKObJS0nbGE8pwdHGST85D7+hzG skZMQTcn3G4qQdaYF/YlPwanDzebd/4Fv6CkN0kvh8BEAsTbaDGPVh81hCnVUpPdtQ7P SG30i8zbqAe0d6UgfoBjjFprb/G8/E1erIQjtpPFbQCUNyklFeV+zoRXfqQr0srKHksN dB4EFbK7TLn3zG+n30KT1RdHsWU2ntTNc8zkWeG0l2HLOaaZ3tWlu1w8xW+9wCuwQdvU 3w7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QNs9+fRr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s22-20020a05620a255600b00767cf4c720asi810386qko.633.2023.07.11.07.03.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Jul 2023 07:03:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QNs9+fRr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJDwV-000350-BB; Tue, 11 Jul 2023 10:02:15 -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 1qJDwP-00033M-2B for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:09 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJDwM-00085b-6s for qemu-devel@nongnu.org; Tue, 11 Jul 2023 10:02:08 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-9928abc11deso723664866b.1 for ; Tue, 11 Jul 2023 07:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689084124; x=1691676124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4/go/SNx7o3UmNqsJvS9SSRzBMvZWAoewv5X6oINpyQ=; b=QNs9+fRrs4QwmB1sBBcm+T+TXTATax+LNfmXcF08vexYlZgrNJdOM6iTkLpZiYSr7z dFN8p19jhw4lNLs782AjLyjHIOBlDdPb49qRT5WAAKG7SOHD4fu9tQvvgD1+tW1invjS VKm73NyAr78ol5IyvAQo24sNGd+07vpsjF9L23kzG0DMZ9k/rA/CYMiHiXkAeU4d08eI tHNhNr2SbNOs397ZmYVzViYmpL+QtA8ZgR5dI4qEsREVTL2Oasr3hcSeijsjNHuAjFim EgQCgrabxC0QBYvQRZ9/MwVXn5Xu2fZeJ3xYxHoY99A9Dox63y819Ndgi352Sg73v/K8 7muA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689084124; x=1691676124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4/go/SNx7o3UmNqsJvS9SSRzBMvZWAoewv5X6oINpyQ=; b=QfULxA97tfDEy5nJ3cm8Tlcy+VobaQNqZ9oUq7+NDj+70bqrIFMlMPqH7VlrNmDu1j Jy9aPR1qCOINPVkdEZ8cDYPnL2avdzBfxwVuw2eaD5kucZsGlkn6g23EL881qULPgosk l7TxW0nCp3OVOSB8BYG4WKHUSTSs/DU7yD0z8PXpn7dqM9nhDRIDxok6DF1prUR+mHva 4ALBzO27S581hxVkZvxMZbDW4qECayeYyJN+V7U+LAtIU6xe+P5VACN2r0ClQEMwLwaE Dftknny+zpYSkqEfl7gtZCAaA/edJ7JoHp3IZqW3fvoPt0fOgXpQE0DppWCnNmWcDTb4 9kyw== X-Gm-Message-State: ABy/qLYG8sIuHcVTStXO7XS5ZKaNaiJ1WbTi1c8m3HsInPVTAL7ZOY9C KJ3COufo7WZ2xmm9l1lE2nC9YsapSg1pKZf9lCo= X-Received: by 2002:a17:906:6c87:b0:957:2e48:5657 with SMTP id s7-20020a1709066c8700b009572e485657mr14525061ejr.68.1689084124562; Tue, 11 Jul 2023 07:02:04 -0700 (PDT) Received: from m1x-phil.lan ([176.187.194.156]) by smtp.gmail.com with ESMTPSA id r11-20020a17090638cb00b00992f309cfe8sm1211839ejd.178.2023.07.11.07.02.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 11 Jul 2023 07:02:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Warner Losh , Wainer dos Santos Moschetta , Ed Maste , Beraldo Leal , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= , Li-Wen Hsu , Kyle Evans , =?utf-8?q?Alex_Benn=C3=A9e?= , Erik Skultety Subject: [PATCH v2 3/3] tests/vm/freebsd: Get up-to-date package list from lcitool vars file Date: Tue, 11 Jul 2023 16:01:43 +0200 Message-Id: <20230711140143.65818-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230711140143.65818-1-philmd@linaro.org> References: <20230711140143.65818-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Get an up-to-date package list from lcitool, that way we don't need to manually keep this array in sync. Inspired-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- tests/vm/Makefile.include | 2 ++ tests/vm/freebsd | 42 ++------------------------------------- 2 files changed, 4 insertions(+), 40 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index b021b344b5..84b8ad5222 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -110,6 +110,8 @@ $(SRC_PATH)/tests/vm/%.json: $(call quiet-command, \ make lcitool-refresh) +vm-build-freebsd: $(SRC_PATH)/tests/vm/freebsd.json + # Build in VM $(IMAGE) vm-build-%: $(IMAGES_DIR)/%.img $(VM_VENV) $(call quiet-command, \ diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 11de6473f4..ac51376c82 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -31,45 +31,6 @@ class FreeBSDVM(basevm.BaseVM): link = "https://download.freebsd.org/releases/CI-IMAGES/13.2-RELEASE/amd64/Latest/FreeBSD-13.2-RELEASE-amd64-BASIC-CI.raw.xz" csum = "a4fb3b6c7b75dd4d58fb0d75e4caf72844bffe0ca00e66459c028b198ffb3c0e" size = "20G" - pkgs = [ - # build tools - "git", - "pkgconf", - "bzip2", - "python39", - "ninja", - - # gnu tools - "bash", - "gmake", - "gsed", - "gettext", - - # libs: crypto - "gnutls", - - # libs: images - "jpeg-turbo", - "png", - - # libs: ui - "sdl2", - "gtk3", - "libxkbcommon", - - # libs: opengl - "libepoxy", - "mesa-libs", - - # libs: migration - "zstd", - - # libs: networking - "libslirp", - - # libs: sndio - "sndio", - ] BUILD_SCRIPT = """ set -e; @@ -151,8 +112,9 @@ class FreeBSDVM(basevm.BaseVM): self.console_wait(prompt) self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") + pkgs = self.get_qemu_packages_from_lcitool_json() self.print_step("Installing packages") - self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) + self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs)) # shutdown self.ssh_root(self.poweroff)