From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Dang Huynh <danct12@riseup.net>, Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 3/4] test: document pytest --env and --fs options
Date: Tue, 8 Jul 2025 21:35:59 +0200 [thread overview]
Message-ID: <20250708193600.758772-4-a.fatoum@barebox.org> (raw)
In-Reply-To: <20250708193600.758772-1-a.fatoum@barebox.org>
These two options are really useful to avoid needless typing in QEMU by
making files and environment variables available to barebox from outside.
Document them outside of the pytest --help text as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
Documentation/boards/emulated.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/boards/emulated.rst b/Documentation/boards/emulated.rst
index 44e78eef7fe1..602def560120 100644
--- a/Documentation/boards/emulated.rst
+++ b/Documentation/boards/emulated.rst
@@ -59,6 +59,18 @@ more easily::
# Run tests and pass a block device (here /dev/virtioblk0)
pytest --lg-env test/arm/virt@multi_v8_defconfig.yaml --blk=rootfs.ext4
+For testing, the QEMU fw_cfg and virtfs support is particularly useful::
+
+ # inject boot.sh file in working directory into barebox environment
+ # at /env/boot/fit and set /env/nv/boot.default to fit
+ pytest --lg-env test/arm/virt@multi_v8_defconfig.yaml \
+ --env nv/boot.default=fit --env boot/fit=@boot.sh
+
+ # make available the host's local working directory in barebox as
+ # /mnt/9p/host
+ pytest --lg-env test/arm/virt@multi_v8_defconfig.yaml \
+ --fs host=.
+
For a complete listing of possible options run ``pytest --help``.
MAKEALL
--
2.39.5
next prev parent reply other threads:[~2025-07-08 20:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-08 19:35 [PATCH 0/4] test: add/document pytest --graphic, --env, --fs Ahmad Fatoum
2025-07-08 19:35 ` [PATCH 1/4] test: update requirement to Labgrid v25.0 Ahmad Fatoum
2025-07-08 19:35 ` [PATCH 2/4] test: drop now superfluous extra_args Ahmad Fatoum
2025-07-08 19:35 ` Ahmad Fatoum [this message]
2025-07-08 19:36 ` [PATCH 4/4] test: add support for pytest --graphic Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250708193600.758772-4-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=danct12@riseup.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox