From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:44:51 +0000 (+0000) Subject: ftests/088: skip test on non-systemd configuration X-Git-Tag: v3.2.0~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d5138cae69d4878c022f4335c1cde33931e4084;p=thirdparty%2Flibcgroup.git ftests/088: 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/088-sudo-cgclassify_systemd_scope.py b/tests/ftests/088-sudo-cgclassify_systemd_scope.py index 6be897b7..21fdf221 100755 --- a/tests/ftests/088-sudo-cgclassify_systemd_scope.py +++ b/tests/ftests/088-sudo-cgclassify_systemd_scope.py @@ -8,6 +8,7 @@ # from process import Process +from systemd import Systemd from cgroup import Cgroup from run import RunError import consts @@ -31,6 +32,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