mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
test: skip networkd tests if networkd/resolved are disabled at build time
This commit is contained in:
committed by
Daan De Meyer
parent
75b16ac59e
commit
da24983526
@@ -47,6 +47,12 @@ def setUpModule():
|
||||
global tmpmounts
|
||||
|
||||
"""Initialize the environment, and perform sanity checks on it."""
|
||||
|
||||
if shutil.which('networkctl') is None:
|
||||
raise unittest.SkipTest('networkd not installed')
|
||||
if shutil.which('resolvectl') is None:
|
||||
raise unittest.SkipTest('resolved not installed')
|
||||
|
||||
if NETWORKD_WAIT_ONLINE is None:
|
||||
raise OSError(errno.ENOENT, 'systemd-networkd-wait-online not found')
|
||||
|
||||
|
||||
@@ -8958,6 +8958,10 @@ if __name__ == '__main__':
|
||||
else:
|
||||
source_dir = None
|
||||
|
||||
if networkd_bin is None or resolved_bin is None or timesyncd_bin is None:
|
||||
print("networkd tests require networkd/resolved/timesyncd to be enabled")
|
||||
sys.exit(77)
|
||||
|
||||
use_valgrind = ns.use_valgrind
|
||||
enable_debug = ns.enable_debug
|
||||
asan_options = ns.asan_options
|
||||
|
||||
Reference in New Issue
Block a user