summaryrefslogtreecommitdiffstats
path: root/src/test/test-systemd-tmpfiles.py
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2017-12-06 20:04:45 +0100
committerEvgeny Vereshchagin <evvers@ya.ru>2017-12-06 20:30:08 +0100
commit59ca366cdde8e86ef5d8d536ed1220ba38e26b35 (patch)
treefb1733a1199f7eabc48ea25b84d99bb75e3e3a23 /src/test/test-systemd-tmpfiles.py
parentMerge pull request #7419 from keszybz/tmpfiles-fixes (diff)
downloadsystemd-59ca366cdde8e86ef5d8d536ed1220ba38e26b35.tar.xz
systemd-59ca366cdde8e86ef5d8d536ed1220ba38e26b35.zip
tests: allow passing more than one argument to test-systemd-tmpfiles.py
This makes it easier to run `systemd-tmpfiles` under valgrind.
Diffstat (limited to '')
-rwxr-xr-xsrc/test/test-systemd-tmpfiles.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-systemd-tmpfiles.py b/src/test/test-systemd-tmpfiles.py
index 309cee23e6..7e563551cd 100755
--- a/src/test/test-systemd-tmpfiles.py
+++ b/src/test/test-systemd-tmpfiles.py
@@ -28,12 +28,12 @@ try:
except AttributeError:
sys.exit(EXIT_TEST_SKIP)
-exe = sys.argv[1]
+exe_with_args = sys.argv[1:]
def test_line(line, *, user, returncode=EX_DATAERR, extra={}):
args = ['--user'] if user else []
- print('Running {} {} on {!r}'.format(exe, ' '.join(args), line))
- c = subprocess.run([exe, '--create', '-'] + args,
+ print('Running {} on {!r}'.format(' '.join(exe_with_args + args), line))
+ c = subprocess.run(exe_with_args + ['--create', '-'] + args,
input=line, stdout=subprocess.PIPE, universal_newlines=True,
**extra)
assert c.returncode == returncode, c