]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/050: skip test on non-systemd configuration
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 29 Nov 2023 09:18:01 +0000 (09:18 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 7 Dec 2023 16:21:09 +0000 (09:21 -0700)
Skip running the testcase, when compiled with --enable-systemd=no,
using Systemd.is_systemd_enabled().

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 940d77f122c10c4092539e8f9dc663ee3ab150e5)

tests/ftests/050-sudo-systemd_create_scope_w_pid.py

index 9759e7440d1b40cbe1ce3175a8b6522a0dc19772..46a89c3a8d272c46537a60c7d25cf73d52162595 100755 (executable)
@@ -40,6 +40,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