1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00

test-network: show systemd-networkd.service

As there may exist some other drop-in configs.
This commit is contained in:
Yu Watanabe 2019-05-31 13:54:08 +09:00
parent d4fda2a55c
commit 72917fcc65

View File

@ -112,14 +112,13 @@ def setUpModule():
if use_valgrind or asan_options or lsan_options or ubsan_options:
drop_in += ['MemoryDenyWriteExecute=no']
drop_in_str = '\n'.join(drop_in)
print(drop_in_str)
os.makedirs('/run/systemd/system/systemd-networkd.service.d', exist_ok=True)
with open('/run/systemd/system/systemd-networkd.service.d/00-override.conf', mode='w') as f:
f.write(drop_in_str)
f.write('\n'.join(drop_in))
subprocess.check_call('systemctl daemon-reload', shell=True)
output = subprocess.check_output(['systemctl', 'cat', 'systemd-networkd.service'], universal_newlines=True).rstrip()
print(output)
def tearDownModule():
shutil.rmtree(networkd_ci_path)