]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Skip demo-nopic tests if SELinux policy will cause failure.
authorPeter O'Gorman <peter@pogma.com>
Wed, 9 Jun 2010 16:45:51 +0000 (11:45 -0500)
committerPeter O'Gorman <peter@pogma.com>
Wed, 9 Jun 2010 16:45:51 +0000 (11:45 -0500)
* tests/demo-nopic.test: Check SELinux policy and skip if
necessary.

ChangeLog
tests/demo-nopic.test

index a7967b34a003dc5af1b1e244cf2b50cfe279d5ed..78b5d7d73aeb4357a5e879a31b00e528d94948a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-09  Peter O'Gorman  <peter@pogma.com>
+
+       Skip demo-nopic tests if SELinux policy will cause failure.
+       * tests/demo-nopic.test: Check SELinux policy and skip if
+       necessary.
+
 2010-06-09  Gary V. Vaughan  <gary@gnu.org>
 
        Set SCM version number to 2.2.11a.
index 11e5c161ba3b63cca7701b4c206a3c25edeec0de..acceca69546d8d76efaaaa8c30a9a824a342c5ac 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # demo-nopic.test - try configuring the ../demo subdirectory
 #
-#   Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+#   Copyright (C) 2003, 2004, 2010 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2003
 #
 #   This file is part of GNU Libtool.
@@ -34,6 +34,20 @@ hppa*|x86_64*|s390*)
        ;;
 esac
 
+if test "$build" = "$host" && test -d "/etc/selinux"; then
+       _selinux=`getenforce 2>/dev/null || echo "Disabled"`
+       case "${_selinux}" in
+       *Enforcing)
+               _sebool_allow_execmod=`getsebool allow_execmod 2>/dev/null`
+               case "${_sebool_allow_execmod}" in
+                       *off)
+                               func_skip "SELinux policy disallows"
+                               ;;
+               esac
+               ;;
+       esac
+fi
+
 func_rmprefixdir
 func_cd "tests/demo"
 func_make_distclean