mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-30 05:47:59 +00:00
Merge branch 'test-includes' into 'master'
profiles/Makefile: test abstractions against apparmor_parser See merge request apparmor/apparmor!237 Acked-by: Christian Boltz <apparmor@cboltz.de> for trunk and 2.13. Pre-acked for 2.10..2.12 after removing the --config-file option which is not supported in these branches.
This commit is contained in:
commit
2863e20f37
@ -29,6 +29,7 @@ DESTDIR=/
|
||||
PROFILES_DEST=${DESTDIR}/etc/apparmor.d
|
||||
EXTRAS_DEST=${DESTDIR}/usr/share/apparmor/extra-profiles/
|
||||
PROFILES_SOURCE=./apparmor.d
|
||||
ABSTRACTIONS_SOURCE=./apparmor.d/abstractions
|
||||
EXTRAS_SOURCE=./apparmor/profiles/extras/
|
||||
|
||||
SUBDIRS=$(shell find ${PROFILES_SOURCE} -type d -print)
|
||||
@ -84,6 +85,8 @@ docs:
|
||||
|
||||
IGNORE_FILES=${EXTRAS_SOURCE}/README
|
||||
CHECK_PROFILES=$(filter-out ${IGNORE_FILES} ${SUBDIRS}, $(wildcard ${PROFILES_SOURCE}/*) $(wildcard ${EXTRAS_SOURCE}/*))
|
||||
# use find because Make wildcard is not recursive:
|
||||
CHECK_ABSTRACTIONS=$(shell find ${ABSTRACTIONS_SOURCE} -type f -print)
|
||||
|
||||
.PHONY: check
|
||||
check: check-parser check-logprof
|
||||
@ -96,6 +99,14 @@ check-parser: local
|
||||
${PARSER} --config-file=../parser/tst/parser.conf -S -b ${PWD}/apparmor.d $${profile} > /dev/null || exit 1; \
|
||||
done
|
||||
|
||||
@echo "*** Checking abstractions from ${ABSTRACTIONS_SOURCE} against apparmor_parser"
|
||||
$(Q)for abstraction in ${CHECK_ABSTRACTIONS} ; do \
|
||||
[ -n "${VERBOSE}" ] && echo "Testing $${abstraction}" ; \
|
||||
echo "#include <tunables/global> profile test { #include <$${abstraction}> }" \
|
||||
| ${PARSER} --config-file=../parser/tst/parser.conf -S -b ${PWD}/apparmor.d -I ${PWD} > /dev/null \
|
||||
|| exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: check-logprof
|
||||
check-logprof: local
|
||||
@echo "*** Checking profiles from ${PROFILES_SOURCE} against logprof"
|
||||
|
Loading…
x
Reference in New Issue
Block a user