diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-03 10:27:58 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-06 10:56:54 +0200 |
commit | 3cb61e0d1cc30434294962283f79a4f909e9d9dc (patch) | |
tree | d9fb1d56fb688a7cd1e0d7321f6135e95eb67c6b /test/integration-test-wrapper.py | |
parent | test: Only set environment variable if integration tests are enabled. (diff) | |
download | systemd-3cb61e0d1cc30434294962283f79a4f909e9d9dc.tar.xz systemd-3cb61e0d1cc30434294962283f79a4f909e9d9dc.zip |
test: Pass through test matching environment variables to the mkosi VM
Diffstat (limited to 'test/integration-test-wrapper.py')
-rwxr-xr-x | test/integration-test-wrapper.py | 16 |
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( """ |