mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
Merge branch 'utils-check-depends-on-parser-2.11' into 'apparmor-2.11'
Utils check depends on parser See merge request apparmor/apparmor!26 Acked-by: Christian Boltz <apparmor@cboltz.de>
This commit is contained in:
commit
1872c52c6d
2 changed files with 19 additions and 9 deletions
12
README
12
README
|
@ -79,16 +79,16 @@ $ make check
|
|||
$ make install
|
||||
|
||||
|
||||
Utilities:
|
||||
$ cd utils
|
||||
$ make
|
||||
parser:
|
||||
$ cd parser
|
||||
$ make # depends on libapparmor having been built first
|
||||
$ make check
|
||||
$ make install
|
||||
|
||||
|
||||
parser:
|
||||
$ cd parser
|
||||
$ make # depends on libapparmor having been built first
|
||||
Utilities:
|
||||
$ cd utils
|
||||
$ make
|
||||
$ make check
|
||||
$ make install
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ else
|
|||
PARSER=../../parser/apparmor_parser
|
||||
endif
|
||||
|
||||
.PHONY: __libapparmor
|
||||
.PHONY: __libapparmor __parser
|
||||
__libapparmor:
|
||||
ifndef USE_SYSTEM
|
||||
@if [ ! -f $(LD_LIBRARY_PATH)libapparmor.so ]; then \
|
||||
|
@ -47,6 +47,16 @@ ifndef USE_SYSTEM
|
|||
fi
|
||||
endif
|
||||
|
||||
__parser:
|
||||
ifndef USE_SYSTEM
|
||||
@if [ ! -f $(PARSER) ]; then \
|
||||
echo "error: $(PARSER) is missing. Pick one of these possible solutions:" 1>&2; \
|
||||
echo " 1) Test using the in-tree parser by building it first and then trying again. See the top-level README for help." 1>&2; \
|
||||
echo " 2) Test using the system parser by adding USE_SYSTEM=1 to your make command." 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
endif
|
||||
|
||||
COVERAGE_OMIT=test-*.py,common_test.py
|
||||
ifneq ($(COVERAGE_OUT), )
|
||||
HTML_COVR_ARGS=-d $(COVERAGE_OUT)
|
||||
|
@ -67,10 +77,10 @@ endif
|
|||
clean:
|
||||
rm -rf __pycache__/ .coverage htmlcov
|
||||
|
||||
check: __libapparmor
|
||||
check: __libapparmor __parser
|
||||
export PYTHONPATH=$(PYTHONPATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) LC_ALL=C __AA_CONFDIR=$(CONFDIR) __AA_BASEDIR=$(BASEDIR) __AA_PARSER=$(PARSER) ; $(foreach test, $(wildcard test-*.py), echo ; echo === $(test) === ; $(call pyalldo, $(test)))
|
||||
|
||||
.coverage: $(wildcard ../aa-* ../apparmor/*.py test-*.py) __libapparmor
|
||||
.coverage: $(wildcard ../aa-* ../apparmor/*.py test-*.py) __libapparmor __parser
|
||||
export PYTHONPATH=$(PYTHONPATH) LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) LC_ALL=C __AA_CONFDIR=$(CONFDIR) __AA_BASEDIR=$(BASEDIR) __AA_PARSER=$(PARSER) ; $(COVERAGE_IGNORE_FAILURES_CMD) ; $(foreach test, $(wildcard test-*.py), echo ; echo === $(test) === ; $(PYTHON) -m coverage run --branch -p $(test); )
|
||||
$(PYTHON) -m coverage combine
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue