From: Daniel Mack Date: Thu, 19 Nov 2015 13:39:18 +0000 (+0100) Subject: test: disable nspawn checks if machine wasn't booted with systemd X-Git-Tag: v229~277^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3f5c306d3810673364f8eae662f3735ffd645a1d;p=thirdparty%2Fsystemd.git test: disable nspawn checks if machine wasn't booted with systemd Sempaphore containers are not booted with systemd, so machined is not available, which makes nspawn bail. Just skip nspawn tests in such environments. [ -d /run/systemd/system ] is esentially what sd_booted(3) is doing, but on Ubuntu 15.05, without 'systemd-container' installed, we also need to check for the presence of the systemd-machined binary. --- diff --git a/test/test-functions b/test/test-functions index 5d223dbc63e..f8f89996b42 100644 --- a/test/test-functions +++ b/test/test-functions @@ -1131,7 +1131,9 @@ inst_libdir_file() { } check_nspawn() { - [[ -d /sys/fs/cgroup/systemd ]] + [[ -d /sys/fs/cgroup/systemd ]] && \ + [[ -d /run/systemd/system ]] && \ + [[ -e /lib/systemd/systemd-machined ]] }