]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: tighten check for TEST-06-SELINUX dependencies a bit
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Jun 2018 19:27:01 +0000 (21:27 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 6 Jun 2018 08:17:38 +0000 (10:17 +0200)
As it turns out /usr/share/selinux/devel/ is now included in more RPMs
than just selinux-policy-devel (specifically container-selinux, which is
pulled in by various container related RPMs). Let's hence tighten the
dependency check a bit and look for systemd's .if file, which is what we
actually care about.

test/TEST-06-SELINUX/test.sh

index 18856c2459466fa7767aaca956b076910251853c..604ede5b2b95c461b412ed8fd69ef81567fca8d5 100755 (executable)
@@ -11,7 +11,7 @@ TEST_NO_NSPAWN=1
 # selinux-policy-devel
 
 # Check if selinux-policy-devel is installed, and if it isn't bail out early instead of failing
-test -d /usr/share/selinux/devel || exit 0
+test -f /usr/share/selinux/devel/include/system/systemd.if || exit 0
 
 . $TEST_BASE_DIR/test-functions
 SETUP_SELINUX=yes