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')
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