mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
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.
This commit is contained in:
parent
03025f46af
commit
7488492a81
@ -21,15 +21,21 @@ except ImportError:
|
|||||||
id128 = None
|
id128 = None
|
||||||
|
|
||||||
EX_DATAERR = 65 # from sysexits.h
|
EX_DATAERR = 65 # from sysexits.h
|
||||||
|
EXIT_TEST_SKIP = 77
|
||||||
|
|
||||||
|
try:
|
||||||
|
subprocess.run
|
||||||
|
except AttributeError:
|
||||||
|
sys.exit(EXIT_TEST_SKIP)
|
||||||
|
|
||||||
exe = sys.argv[1]
|
exe = sys.argv[1]
|
||||||
|
|
||||||
def test_line(line, *, user, returncode=EX_DATAERR, extra={}):
|
def test_line(line, *, user, returncode=EX_DATAERR, extra={}):
|
||||||
args = ['--user'] if user else []
|
args = ['--user'] if user else []
|
||||||
print('Running {} {} on {!r}'.format(exe, ' '.join(args), line))
|
print('Running {} {} on {!r}'.format(exe, ' '.join(args), line))
|
||||||
c = subprocess.run([exe, '--create', *args, '-'],
|
c = subprocess.run([exe, '--create', '-'] + args,
|
||||||
**extra,
|
input=line, stdout=subprocess.PIPE, universal_newlines=True,
|
||||||
input=line, stdout=subprocess.PIPE, universal_newlines=True)
|
**extra)
|
||||||
assert c.returncode == returncode, c
|
assert c.returncode == returncode, c
|
||||||
|
|
||||||
def test_invalids(*, user):
|
def test_invalids(*, user):
|
||||||
|
Loading…
Reference in New Issue
Block a user