From c3d49f54cdf2c0d491dead0365406303eae52a65 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:37:16 +0000 Subject: [PATCH] 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 --- tests/ftests/071-sudo-set_default_systemd_cgroup.py | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.2