summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-03 10:27:58 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-05-06 10:56:54 +0200
commit3cb61e0d1cc30434294962283f79a4f909e9d9dc (patch)
treed9fb1d56fb688a7cd1e0d7321f6135e95eb67c6b
parenttest: Only set environment variable if integration tests are enabled. (diff)
downloadsystemd-3cb61e0d1cc30434294962283f79a4f909e9d9dc.tar.xz
systemd-3cb61e0d1cc30434294962283f79a4f909e9d9dc.zip
test: Pass through test matching environment variables to the mkosi VM
-rwxr-xr-xtest/integration-test-wrapper.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py
index f3b1172a5d..e3dcf75239 100755
--- a/test/integration-test-wrapper.py
+++ b/test/integration-test-wrapper.py
@@ -64,6 +64,22 @@ def main():
"""
)
+ if os.getenv("TEST_MATCH_SUBTEST"):
+ dropin += textwrap.dedent(
+ f"""
+ [Service]
+ Environment=TEST_MATCH_SUBTEST={os.environ["TEST_MATCH_SUBTEST"]}
+ """
+ )
+
+ if os.getenv("TEST_MATCH_TESTCASE"):
+ dropin += textwrap.dedent(
+ f"""
+ [Service]
+ Environment=TEST_MATCH_TESTCASE={os.environ["TEST_MATCH_TESTCASE"]}
+ """
+ )
+
if not sys.stderr.isatty():
dropin += textwrap.dedent(
"""