Author: Jamie Strandboge <jamie@canonical.com>

Description: the Ubuntu buildds do not have the AppArmor securityfs mounted, so
 the cache tests fail. This patch skips these tests if the introspection
 directory is not mounted, but runs them if it is. This should allow testing of
 local builds while still allowing builds on the official buildds.

Acked-By: Steve Beattie <sbeattie@ubuntu.com> - both Ubuntu and
OpenSUSE were carrying patches that disabled the caching test,
though OpenSUSE's disabled it completely rather than checking. The
parser builds need to complete even when the kernel it's building on
doesn't support AppArmor or all the extensions that the parser needs
at runtime.
This commit is contained in:
Steve Beattie 2011-02-15 10:34:17 -08:00
parent 5425aadb6d
commit 955404ca00

View file

@ -3,6 +3,13 @@
# on the actions and results of the prior tests.
set -e
# This test requires introspection
if [ ! -d /sys/kernel/security/apparmor ]; then
echo "WARNING: /sys/kernel/security/apparmor does not exist. Skipping tests"
echo "requiring introspection."
exit 0
fi
# fake base directory
basedir=$(mktemp -d -t aa-cache-XXXXXX)
trap "rm -rf $basedir" EXIT