1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

test: Pass through test matching environment variables to the mkosi VM

This commit is contained in:
Daan De Meyer 2024-05-03 10:27:58 +02:00
parent 38db5eff34
commit 3cb61e0d1c

View File

@ -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(
"""