From bccb3f5bb76471417af1b9fe91fb698fb54653a8 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 29 Nov 2023 09:42:55 +0000 Subject: [PATCH] ftests/085: 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/085-sudo-cgexec_systemd_scope.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ftests/085-sudo-cgexec_systemd_scope.py b/tests/ftests/085-sudo-cgexec_systemd_scope.py index 73fa088b..54835fb0 100755 --- a/tests/ftests/085-sudo-cgexec_systemd_scope.py +++ b/tests/ftests/085-sudo-cgexec_systemd_scope.py @@ -9,6 +9,7 @@ from multiprocessing import active_children from process import Process +from systemd import Systemd from cgroup import Cgroup from run import RunError import consts @@ -32,6 +33,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