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

This commit is contained in:
Daan De Meyer
2024-05-06 10:56:54 +02:00
parent 38db5eff34
commit 3cb61e0d1c
+16
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(
"""