summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-03-23 09:48:15 +0100
committerLennart Poettering <lennart@poettering.net>2018-03-23 15:29:35 +0100
commit67321fdf3ea60566a718a2e60ddc2628609a2895 (patch)
treec55507c9ee210a9d810cb938bf00ef394cac737f /test
parentstat-util: fix fd_is_network_ns() (diff)
downloadsystemd-67321fdf3ea60566a718a2e60ddc2628609a2895.tar.xz
systemd-67321fdf3ea60566a718a2e60ddc2628609a2895.zip
test: bypass selinux integration test if selinux policy devel package is not installed
With this "sudo ./run-integration-tests.sh" should work fully without exception, even on systems lacking SELinux (in which case that test will just be skipped)
Diffstat (limited to 'test')
-rwxr-xr-xtest/TEST-06-SELINUX/test.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh
index e0c4c10e1c..18856c2459 100755
--- a/test/TEST-06-SELINUX/test.sh
+++ b/test/TEST-06-SELINUX/test.sh
@@ -10,6 +10,9 @@ TEST_NO_NSPAWN=1
# selinux-policy-targeted
# 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_BASE_DIR/test-functions
SETUP_SELINUX=yes
KERNEL_APPEND="$KERNEL_APPEND selinux=1 security=selinux"