Test coverage integration for external tests and complete suite.

coverage.log files are output to each testing dir and reflect
the number of times statement locations of Bro scripts are executed.
This commit is contained in:
Jon Siwek 2012-01-12 11:58:13 -06:00
parent aff631b5e0
commit b6c3567ba4
3 changed files with 7 additions and 0 deletions

1
testing/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
coverage.log

View file

@ -3,6 +3,11 @@ DIRS=btest external
all: all:
@for repo in $(DIRS); do (cd $$repo && make ); done @for repo in $(DIRS); do (cd $$repo && make ); done
@cp btest/coverage.log `mktemp brocov.tmp.XXX`
@for f in external/*/coverage.log; do cp $$f `mktemp brocov.tmp.XXX`; done
@echo "Complete test suite code coverage:"
@./scripts/coverage-calc "brocov.tmp.*" coverage.log `pwd`
@rm -f brocov.tmp.*
brief: brief:
@for repo in $(DIRS); do (cd $$repo && make brief ); done @for repo in $(DIRS); do (cd $$repo && make brief ); done

View file

@ -17,3 +17,4 @@ TRACES=%(testbase)s/Traces
SCRIPTS=%(testbase)s/../scripts SCRIPTS=%(testbase)s/../scripts
DIST=%(testbase)s/../../.. DIST=%(testbase)s/../../..
BUILD=%(testbase)s/../../../build BUILD=%(testbase)s/../../../build
BROFILER_FILE=%(testbase)s/.tmp/script-coverage