From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:37:16 +0000 (+0000) Subject: ftests/071: skip test on non-systemd configuration X-Git-Tag: v3.2.0~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3d49f54cdf2c0d491dead0365406303eae52a65;p=thirdparty%2Flibcgroup.git ftests/071: skip test on non-systemd configuration Skip running the testcase, when compiled with --enable-systemd=no, using Systemd.is_systemd_enabled(). Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/tests/ftests/071-sudo-set_default_systemd_cgroup.py b/tests/ftests/071-sudo-set_default_systemd_cgroup.py index 2c453203..bbec4f74 100755 --- a/tests/ftests/071-sudo-set_default_systemd_cgroup.py +++ b/tests/ftests/071-sudo-set_default_systemd_cgroup.py @@ -11,6 +11,7 @@ from libcgroup import Version, Cgroup, Mode from cgroup import Cgroup as CgroupCli from process import Process +from systemd import Systemd import consts import ftests import time @@ -33,6 +34,10 @@ def prereqs(config): result = consts.TEST_SKIPPED cause = 'This test cannot be run within a container' + if not Systemd.is_systemd_enabled(): + result = consts.TEST_SKIPPED + cause = 'Systemd support not compiled in' + return result, cause