]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
ftests/065: skip test on non-systemd configuration
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 29 Nov 2023 09:30:36 +0000 (09:30 +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 bdf67be2d4abb177f02ee9a56b7e50be3eb20fe5)

tests/ftests/065-sudo-systemd_cgclassify-v1.py

index 850c1362ae48d7298f4aab25f3da6f0ed7abd98c..a284ae0b8ebce221f8efc82a1323b347326d9dcf 100755 (executable)
@@ -44,6 +44,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