From 7488492a81db8011758325bd6a7c949c38a0b7c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 2 Dec 2017 14:00:58 +0100 Subject: [PATCH] test-systemd-tmpfiles: skip on python3.4 python3.4 is used by our CI. Let's revert this when we stop supporting python < 3.5. --- src/test/test-systemd-tmpfiles.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/test/test-systemd-tmpfiles.py b/src/test/test-systemd-tmpfiles.py index b73368ddef2..1368839381c 100755 --- a/src/test/test-systemd-tmpfiles.py +++ b/src/test/test-systemd-tmpfiles.py @@ -21,15 +21,21 @@ except ImportError: id128 = None EX_DATAERR = 65 # from sysexits.h +EXIT_TEST_SKIP = 77 + +try: + subprocess.run +except AttributeError: + sys.exit(EXIT_TEST_SKIP) exe = 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, '-'], - **extra, - input=line, stdout=subprocess.PIPE, universal_newlines=True) + c = subprocess.run([exe, '--create', '-'] + args, + input=line, stdout=subprocess.PIPE, universal_newlines=True, + **extra) assert c.returncode == returncode, c def test_invalids(*, user):