mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
utils: Set parser executable path according to USE_SYSTEM make variable
if USE_SYSTEM is not set, the utils make check target will instruct test-aa-easyprof.py to provide the path of the in-tree parser executable to aa-easyprof. If USE_SYSTEM is set, the default parser path (/sbin/apparmor_parser or the result of `which apparmor_parser`) is used. The test-aa-easyprof.py script receives the parser path by checking the __AA_PARSER environment variable. This environment variable is strictly used by the test script and not any user-facing code so two leading underscores were used. Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Christian Boltz <apparmor@cboltz.de> Acked-by: Seth Arnold <seth.arnold@canonical.com>
This commit is contained in:
@@ -173,6 +173,13 @@ TEMPLATES_DIR="%s/templates"
|
||||
if base:
|
||||
self.full_args.append('--base=%s' % base)
|
||||
|
||||
# Check __AA_PARSER, which may be set by the Makefile, to see if
|
||||
# we should use a non-default apparmor_parser path to verify
|
||||
# policy
|
||||
parser = os.getenv('__AA_PARSER')
|
||||
if parser:
|
||||
self.full_args.append('--parser=%s' % parser)
|
||||
|
||||
if debugging:
|
||||
self.full_args.append('-d')
|
||||
|
||||
|
Reference in New Issue
Block a user