From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:40:30 +0000 (+0000) Subject: ftests/079: skip test on non-systemd configuration X-Git-Tag: v3.2.0~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4a92649e3bd540ae066879e25aa82c7ef3308fc;p=thirdparty%2Flibcgroup.git ftests/079: 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/079-sudo-cgcreate_default_systemd_scope.py b/tests/ftests/079-sudo-cgcreate_default_systemd_scope.py index c42d371a..4b9b7fbe 100755 --- a/tests/ftests/079-sudo-cgcreate_default_systemd_scope.py +++ b/tests/ftests/079-sudo-cgcreate_default_systemd_scope.py @@ -7,9 +7,10 @@ # Author: Tom Hromatka # -from cgroup import Cgroup from process import Process +from systemd import Systemd from libcgroup import Mode +from cgroup import Cgroup from run import RunError from log import Log import consts @@ -36,6 +37,10 @@ def prereqs(config): result = consts.TEST_SKIPPED cause = 'This test requires the unified cgroup hierarchy' + if not Systemd.is_systemd_enabled(): + result = consts.TEST_SKIPPED + cause = 'Systemd support not compiled in' + return result, cause