From 67321fdf3ea60566a718a2e60ddc2628609a2895 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 23 Mar 2018 09:48:15 +0100 Subject: [PATCH] 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) --- test/TEST-06-SELINUX/test.sh | 3 +++ 1 file changed, 3 insertions(+) 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"