From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:20:34 +0000 (+0000) Subject: ftests/059: skip test on non-systemd configuration X-Git-Tag: v3.2.0~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93dcd53ebb106693f2f13393574dfda61c0505e5;p=thirdparty%2Flibcgroup.git ftests/059: 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/059-sudo-invalid_systemd_create_scope2.py b/tests/ftests/059-sudo-invalid_systemd_create_scope2.py index 25d2e390..ceaf7167 100755 --- a/tests/ftests/059-sudo-invalid_systemd_create_scope2.py +++ b/tests/ftests/059-sudo-invalid_systemd_create_scope2.py @@ -9,6 +9,7 @@ from cgroup import CgroupVersion as CgroupCliVersion from libcgroup import Cgroup, Version +from systemd import Systemd import ftests import consts import sys @@ -32,6 +33,10 @@ def prereqs(config): result = consts.TEST_SKIPPED cause = 'This test requires cgroup v2' + if not Systemd.is_systemd_enabled(): + result = consts.TEST_SKIPPED + cause = 'Systemd support not compiled in' + return result, cause