All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony@xenproject.org>
To: xen-devel@lists.xenproject.org
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Doug Goldstein" <cardoe@cardoe.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: [RFC XEN PATCH 12/13] pytest: Add example .env for options for the tests
Date: Tue, 22 Sep 2026 12:08:59 +0200	[thread overview]
Message-ID: <20260922100900.29129-13-anthony@xenproject.org> (raw)
In-Reply-To: <20260922100900.29129-1-anthony@xenproject.org>

From: Anthony PERARD <anthony.perard@vates.tech>

All thees could be instead pass to the environment of a gitlab-runner
job instead. But that can make developing easier.

Signed-off-by: Anthony PERARD <anthony.perard@vates.tech>
---
 automation/pytest/.env           | 19 +++++++++++++++++++
 automation/pytest/pyproject.toml |  1 +
 automation/pytest/pytest.toml    |  4 ++++
 3 files changed, 24 insertions(+)
 create mode 100644 automation/pytest/.env

diff --git a/automation/pytest/.env b/automation/pytest/.env
new file mode 100644
index 000000000000..6ac8b6158de8
--- /dev/null
+++ b/automation/pytest/.env
@@ -0,0 +1,19 @@
+# Test machine
+HOST_MAC="ff:ff:ff:ff:ff:ff"
+HOST_IP_GATEWAY="203.0.113.1"
+HOST_IP_VLANID=42
+HOST_IP4="203.0.113.42/24"
+HOST_IP6="2001:db8::1:42/32"
+
+# IPMI
+IPMI_HOSTNAME='moonshot.example.org'
+IPMI_BLADE_NODE="c42n1"
+
+# Network environment
+# XXX default value probably not needed with env_files_skip_if_set
+PXE_HOST=${PXE_HOST:-pxe.example.org}
+PXE_HTTP_PATH="configs/custom/${HOST_MAC}"
+PXE_SSH_USER=pxe
+PXE_SSH_PATH="pxe/moonshot-c42"
+
+SSH_PUB_KEYS="ssh-algo AAAArandomstring Not a real key\n"
diff --git a/automation/pytest/pyproject.toml b/automation/pytest/pyproject.toml
index c54c1338f656..b62befaa07d3 100644
--- a/automation/pytest/pyproject.toml
+++ b/automation/pytest/pyproject.toml
@@ -7,6 +7,7 @@ dependencies = [
     "paramiko<5.0.0",
     "pip>=26.0.1",
     "pytest>=9.0.2",
+    "pytest-env>=1.6.0",
     "pytest-timeout>=2.4.0",
     "types-paramiko>=4.0.0.20260322",
 ]
diff --git a/automation/pytest/pytest.toml b/automation/pytest/pytest.toml
index ef61ff74ab47..405a56a83301 100644
--- a/automation/pytest/pytest.toml
+++ b/automation/pytest/pytest.toml
@@ -7,3 +7,7 @@ log_cli_format = "%(asctime)s %(levelname)s %(message)s"
 log_cli_date_format = "%H:%M:%S"
 log_cli_level = "DEBUG"
 log_cli = true
+
+[pytest_env]
+env_files = [".env"]
+env_files_skip_if_set = true
-- 
Anthony PERARD



  parent reply	other threads:[~2026-09-22 10:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 10:08 [RFC XEN PATCH 00/13] Running bare-metal tests with "pytest" Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 01/13] pytest: Add fixture to prepare rootfs Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 02/13] Creating new python project Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 03/13] pytest: Add fixture to prepare the tftp server Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 04/13] pytest: Add fixture that boot a machine Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 05/13] pytest: Introduce reading the console, and add a test Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 06/13] We need an older version of paramiko Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 07/13] pytest: Add random string to look for in the logs Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 08/13] pytest: Run run-tools-tests over ssh on the test machine Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 09/13] pytest: Generate a rootfs for a guest Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 10/13] pytest: Add guest test Anthony PERARD
2026-09-22 10:08 ` [RFC XEN PATCH 11/13] pytest: Add config to enable live log, and disable ssh/paramiko logging Anthony PERARD
2026-09-22 10:08 ` Anthony PERARD [this message]
2026-09-22 10:09 ` [RFC XEN PATCH 13/13] gitlab-ci: Add job for moonshot with pytest Anthony PERARD
2026-09-22 11:01 ` [RFC XEN PATCH 00/13] Running bare-metal tests with "pytest" Marek Marczykowski-Górecki
2026-09-22 14:31 ` Baptiste Le Duc

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=20260922100900.29129-13-anthony@xenproject.org \
    --to=anthony@xenproject.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=cardoe@cardoe.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.