[apparmor] [patch] update dependencies for utils coverage
Steve Beattie
steve at nxnw.org
Thu Nov 13 22:57:36 UTC 2014
On Fri, Nov 07, 2014 at 05:52:19PM +0100, Christian Boltz wrote:
> now that the severity tests are part of make coverage, we should extend
> the dependencies to the files needed by test-severity.py.
>
> Another (easier) option would be to use
> .coverage: $(wildcard ../aa-* ../apparmor/*.py *)
This would that even temporary files like *.pyc would be taken
into consideration.
> === modified file 'utils/test/Makefile'
> --- utils/test/Makefile 2014-11-04 21:01:14 +0000
> +++ utils/test/Makefile 2014-11-07 16:49:10 +0000
> @@ -42,7 +42,9 @@
> check:
> export PYTHONPATH=.. ; $(foreach test, $(wildcard test-*.py), $(call pyalldo, $(test)))
>
> -.coverage: $(wildcard ../aa-* ../apparmor/*.py test-*.py)
> +# files needed by test-*.py:
> +# - test-severity.py: severity.db severity_broken.db
> +.coverage: $(wildcard ../aa-* ../apparmor/*.py test-*.py severity.db severity_broken.db)
No need to include severity.db and severity_broken.db within
the wildcard, unless you were going to convert to something like
severity*.db. The latter might make more sense if you were planning
to add additional test dbs, but if that's the case, I'd rather see
them live in a severity/ subdirectory, rather than adding to the
clutter of the test/ directory.
On Thu, Nov 13, 2014 at 02:01:30PM -0600, Tyler Hicks wrote:
> Would it be cleaner to add a target for test-severity.py which lists
> severity.db and severity_broken.db as prereqs?
You'd need a rule that would 'rebuild' test-severity.db, otherwise make
will be unhappy. Also, unless that build rule does something akin to
'touch test-severity.db', the severity.dbs will end up always being
newer and triggering regeneration.
All this dependency complexity is why I kind of wanted to avoid the
problem and just mark the coverage generation stuff PHONY.
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141113/ac1b12a7/attachment.pgp>
More information about the AppArmor
mailing list