| Message ID | 20251117155927.427462-1-andreas.stergiopoulos@smile.fr |
|---|---|
| Headers | show
Return-Path: <andreas.stergiopoulos@smile.fr>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
aws-us-west-2-korg-lkml-1.web.codeaurora.org
Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
(localhost.localdomain [127.0.0.1])
by smtp.lore.kernel.org (Postfix) with ESMTP id 574A4CEBF61
for <webhook@archiver.kernel.org>; Mon, 17 Nov 2025 16:00:04 +0000 (UTC)
Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com
[209.85.128.49])
by mx.groups.io with SMTP id smtpd.msgproc01-g2.12980.1763395195584089665
for <openembedded-core@lists.openembedded.org>;
Mon, 17 Nov 2025 07:59:55 -0800
Authentication-Results: mx.groups.io;
dkim=pass header.i=@smile.fr header.s=google header.b=GdVLAKBI;
spf=pass (domain: smile.fr, ip: 209.85.128.49,
mailfrom: andreas.stergiopoulos@smile.fr)
Received: by mail-wm1-f49.google.com with SMTP id
5b1f17b1804b1-47790b080e4so16271725e9.3
for <openembedded-core@lists.openembedded.org>;
Mon, 17 Nov 2025 07:59:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=smile.fr; s=google; t=1763395194; x=1763999994;
darn=lists.openembedded.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=S+wbh7JCzJArMvhfOY7bYB4n6GMLuKy+Zsgqn7dJEFA=;
b=GdVLAKBIR4ozoDQQgb39FShYvaczriC/u4vPa7ghaUs5QLZBcbaEmVfx1Bc47L63BA
sDzof1gFc+4RgD0fvoIBhaOtUOA4sdExrxmr5ybXh7B4byh/StZy3BwtFPBzU6qik52I
YKFF61aO5VMeZ4ahrf/Yq/ZBSbKdob8bTGxuc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1763395194; x=1763999994;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=S+wbh7JCzJArMvhfOY7bYB4n6GMLuKy+Zsgqn7dJEFA=;
b=PTTUWCuMi22oCa3YXHFzAZURv1lEwXoiGrzC6amKi6kQaTkIGP7wUEhDYoNnXN7pM7
rIM3Z2q0Dsa3/5g1E8EuXjnAvCXuUlDpev4PbmcvzPSOb18sdTk1Z7y3Q3jjTZ4l2XZq
FOK3du90V0UEbrhgA8KC/xEGvovzIbaizR8xMarlFswDOC99yaeUUIEuJjg9NXtjdGg6
FEJaIylff72wKDkHVu2Iw/agktXnf7H9TbtfUcRGAxqBVznoaBTNf8EAo7tykrTR4E+5
tc/48xnIKbmfNFafGrojI+kybpFvQLDLX33AiHRqGBGX4WeJ8RsfIFik9keKhLilaZTJ
mdDQ==
X-Gm-Message-State: AOJu0YzWRlqdNUjyKXMdEMl8/DsYPXLf2odvP8lLMW5zNmdCL/w2B/J5
X0u9dNGVLgpG1ea9ltjSKUVjTEx/Ne9jEdgV9nhy2YWundfr0XuwDDzDGUr8aGvExFFpzndimfv
jY+9N
X-Gm-Gg: ASbGnctV5ZWv/CMvdraNdlN2pU4VE73LXRA7X+TZuPA99zqSW2Qq5vpSmAkq7SvyC8Q
aq0EubqnONrOtPk6UlYF1cJ5nURmOuR3lH42qA6g2I3WcCeHFEwoSGWhECZoT245jdG5oK1z42n
hfQr9BDXjVcvMU8BpVyFHZIl7X5VBC7hqwBlOKIkwAxj6IJiYRd6ctZMq13QCUit48bZyQ20XIJ
Bs8aDYLcJNQAcJw4dwDuer4tcGzTBBEQgmYLlVkFZKiKrVXMESHOL5eFTvxYffY+p5FXjjk3Uwf
0pDGkhYtOYkau+bgSwh13bIl+50uDWKbMnnvJCWItK6IvnGTDTPsQGHhLzUrrq1rgYN1FPt2EMV
c+ItfOKuaXI9eoMTuRBxKYSYHAf9/3p600Ex1kfoJYRbj4TxcN4onmKVPbCWdJAzbWok5cLts3W
Vom0XJD1B9/t3T2Zuh1lchTpgMrkaLuU9mGZfPcKwnJ22qmPjbRhA5q/Jgq0HgczgdIXXaX5XPv
IWQdg16ifysVEFMnGqmeJaWL+e73JTa4nbr33jhEg==
X-Google-Smtp-Source:
AGHT+IFJDriE3mx+4HB+qIzzClKAKMOPhFU7C5xPF07eVaF+lIdgIYUuNjev8YpjL3ZGOnp5SPzzvw==
X-Received: by 2002:a05:600c:1f91:b0:475:dd9a:f791 with SMTP id
5b1f17b1804b1-4778feadab1mr113477155e9.28.1763395193733;
Mon, 17 Nov 2025 07:59:53 -0800 (PST)
Received: from FRSMI25-PILS.idf.intranet
(static-css-ccs-204145.business.bouyguestelecom.com. [176.157.204.145])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-47787daab3fsm340609225e9.0.2025.11.17.07.59.53
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 17 Nov 2025 07:59:53 -0800 (PST)
From: Andreas Stergiopoulos <andreas.stergiopoulos@smile.fr>
To: openembedded-core@lists.openembedded.org
Cc: yoann.congal@smile.fr,
Andreas Stergiopoulos <andreas.stergiopoulos@smile.fr>
Subject: [PATCH v2 0/3] Better support for Rust integration tests
Date: Mon, 17 Nov 2025 16:59:24 +0100
Message-ID: <20251117155927.427462-1-andreas.stergiopoulos@smile.fr>
X-Mailer: git-send-email 2.43.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
List-Id: <openembedded-core.lists.openembedded.org>
X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com
[45.33.107.173] by
aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for
<openembedded-core@lists.openembedded.org>; Mon, 17 Nov 2025 16:00:04 -0000
X-Groupsio-URL:
https://lists.openembedded.org/g/openembedded-core/message/226496
|
| Series | Better support for Rust integration tests | expand |
When executing integration tests generated by cargo test, every test that needs to somehow interact with the generated binary executables fails. This is due to the fact that most projects in Rust either use static methods to find the generated executable (such as going up and down the build directories) or use the "CARGO_BIN_EXE_<package-name>" environment variable, which is exported by cargo during compilation. Until now, ptest-cargo copies all the binary executables produced (unit and integration tests and binary executables) to the /usr/lib/<package>/ptest directory, where the run-ptest script executes the tests. Unit tests succeed but integration tests almost always fail. A side-effect of that is that the same binary is duplicated, as it can be found both in the package installation directory and in the corresponding ptest directory. This patch series improves the support of said integration tests by exporting the appropriate environment variables during test runtime as well, so that integration tests can access the binary executables they neeed irregardless of the configuration of their environment. The method proposed here is a powerful tool for Rust integration for Yocto, as it allows the ptest-cargo framework to execute the actual installed binary packages while at the same time it also reduces image size, by avoiding the deduplication of the binary executables. v1: Original version. v2: Removed "-" from env invocation, as it implied an empty environment, which broke existing tests and improved how spaces are printed in order to increase readability and make the generated code better-looking. Andreas Stergiopoulos (3): ptest-cargo.bbclass: Collect only test binaries and not executables cargo.bbclass: Collect installation paths of executable binariesv ptest-cargo.bbclass: Add support for CARGO_BIN_EXE_<name> environment variables meta/classes-recipe/cargo.bbclass | 3 ++ meta/classes-recipe/ptest-cargo.bbclass | 44 +++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 3 deletions(-)