[apparmor] [PATCH 0/8] Adjust the utils tests to test what's in the source tree
Tyler Hicks
tyhicks at canonical.com
Wed Feb 8 22:01:37 UTC 2017
The utils tests, ran via $(make -C utils/ check), have long suffered from
requiring files which originate in the AppArmor source tree to be installed
in a system-wide manner. Some examples of files that are assumed to be
installed in system-wide locations are profiles, abstractions, configuration
files for the utils, and the parser itself. This patch set adjusts the utils
tests to, by default, utilize the files in the source tree rather than looking
outside of the source tree. This drove some changes into the utils themselves
in the case of aa-easyprof.
With this patch set applied, I can successfully perform a run of the utils
tests in a minimal, pristine Ubuntu Zesty chroot containing no installed
AppArmor packages.
For developers that want to continue testing against the system packages, the
USE_SYSTEM=1 make variable can be passed to the make command.
Tyler Hicks (8):
utils: Improve error messages when profiles/parser is not found
utils: Update the logprof.conf in the test dir to point to in-tree paths
utils: Add confdir env variable to aa.py for in-tree testing
utils: Fix failing tests in test-aa.py
utils: Accept parser base and include options in aa-easyprof
utils: Set parser base path according to USE_SYSTEM make variable
utils: Add option to aa-easyprof to specify the apparmor_parser path
utils: Set parser executable path according to USE_SYSTEM make variable
utils/aa-easyprof.pod | 14 ++++++
utils/apparmor/aa.py | 6 +--
utils/apparmor/easyprof.py | 64 +++++++++++++++++++------
utils/test/Makefile | 10 +++-
utils/test/logprof.conf | 6 +--
utils/test/test-aa-easyprof.py | 105 +++++++++++++++++++++++++++++++++++++++++
utils/test/test-aa.py | 8 ++--
utils/test/test-config.py | 2 +-
8 files changed, 188 insertions(+), 27 deletions(-)
--
2.7.4
More information about the AppArmor
mailing list