]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "test: propagate log env vars in run-unit-tests.py wrapper"
authorLuca Boccassi <luca.boccassi@gmail.com>
Sat, 13 Sep 2025 13:45:54 +0000 (14:45 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 15 Sep 2025 09:22:19 +0000 (11:22 +0200)
The default is already to propagate the env vars, so this
was unnecessary and actually creates problem as it removes
custom PATHs

This reverts commit 994af53395df1b572e9a9addc4c9a5452f427034.

test/run-unit-tests.py

index 64f50c465c0281806c06813f79fb5950bef613ab..de8ac5c26cb43725f040d6b9cdf61bd58ebe459b 100755 (executable)
@@ -35,12 +35,6 @@ def argument_parser():
 
 opts = argument_parser().parse_args()
 
-env = {}
-if 'SYSTEMD_LOG_LEVEL' in os.environ:
-    env['SYSTEMD_LOG_LEVEL'] = os.environ['SYSTEMD_LOG_LEVEL']
-if 'SYSTEMD_LOG_TARGET' in os.environ:
-    env['SYSTEMD_LOG_TARGET'] = os.environ['SYSTEMD_LOG_TARGET']
-
 unittestdir = pathlib.Path(__file__).parent.absolute() / 'unit-tests'
 
 tests = list(unittestdir.glob('test-*'))
@@ -59,7 +53,7 @@ for test in sorted(tests):
         total.skip += 1
         continue
 
-    ex = subprocess.run(test, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env)
+    ex = subprocess.run(test, stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     if ex.returncode == 0:
         print(f'{GREEN}PASS: {name}{RESET_ALL}')
         total.good += 1