mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Merge branch 'master' of ssh://git.bro-ids.org/bro into topic/robin/log-threads
This commit is contained in:
commit
b6912f16aa
8 changed files with 36 additions and 13 deletions
21
CHANGES
21
CHANGES
|
@ -1,4 +1,25 @@
|
||||||
|
|
||||||
|
2.0-36 | 2012-01-27 10:38:14 -0800
|
||||||
|
|
||||||
|
* New "Brofiler" mode that tracks and records script statements
|
||||||
|
executed during runtime. (Jon Siwek)
|
||||||
|
|
||||||
|
Use the BROFILER_FILE environment variable to point to a file in
|
||||||
|
which statement usage statistics from Bro script-layer can be
|
||||||
|
output.
|
||||||
|
|
||||||
|
Script statements that should be ignored can be marked with a "#
|
||||||
|
@no-test" comment. For example:
|
||||||
|
|
||||||
|
print "don't cover"; # @no-test
|
||||||
|
|
||||||
|
if ( F )
|
||||||
|
{ # @no-test
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
* Integrated coverage measurement into test-suite. (Jon Siwek)
|
||||||
|
|
||||||
2.0-20 | 2012-01-25 16:34:51 -0800
|
2.0-20 | 2012-01-25 16:34:51 -0800
|
||||||
|
|
||||||
* BiF cleanup (Matthias Vallentin)
|
* BiF cleanup (Matthias Vallentin)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.0-20
|
2.0-36
|
||||||
|
|
|
@ -12,8 +12,8 @@ make-brief:
|
||||||
@for repo in $(DIRS); do (cd $$repo && make brief ); done
|
@for repo in $(DIRS); do (cd $$repo && make brief ); done
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
@cp btest/coverage.log `mktemp brocov.tmp.XXX`
|
@test -f btest/coverage.log && cp btest/coverage.log `mktemp brocov.tmp.XXX` || true
|
||||||
@for f in external/*/coverage.log; do cp $$f `mktemp brocov.tmp.XXX`; done
|
@for f in external/*/coverage.log; do test -f $$f && cp $$f `mktemp brocov.tmp.XXX` || true; done
|
||||||
@echo "Complete test suite code coverage:"
|
@echo "Complete test suite code coverage:"
|
||||||
@./scripts/coverage-calc "brocov.tmp.*" coverage.log `pwd`/../scripts
|
@./scripts/coverage-calc "brocov.tmp.*" coverage.log `pwd`/../scripts
|
||||||
@rm -f brocov.tmp.*
|
@rm -f brocov.tmp.*
|
||||||
|
|
|
@ -2,14 +2,16 @@
|
||||||
DIAG=diag.log
|
DIAG=diag.log
|
||||||
BTEST=../../aux/btest/btest
|
BTEST=../../aux/btest/btest
|
||||||
|
|
||||||
all:
|
all: cleanup
|
||||||
# Showing all tests.
|
# Showing all tests.
|
||||||
@rm -f $(DIAG)
|
|
||||||
@rm -f .tmp/script-coverage*
|
|
||||||
@$(BTEST) -f $(DIAG)
|
@$(BTEST) -f $(DIAG)
|
||||||
@../scripts/coverage-calc ".tmp/script-coverage*" coverage.log `pwd`/../../scripts
|
@../scripts/coverage-calc ".tmp/script-coverage*" coverage.log `pwd`/../../scripts
|
||||||
|
|
||||||
brief:
|
brief: cleanup
|
||||||
# Brief output showing only failed tests.
|
# Brief output showing only failed tests.
|
||||||
@rm -f $(DIAG)
|
|
||||||
@$(BTEST) -b -f $(DIAG)
|
@$(BTEST) -b -f $(DIAG)
|
||||||
|
@../scripts/coverage-calc ".tmp/script-coverage*" coverage.log `pwd`/../../scripts
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
@rm -f $(DIAG)
|
||||||
|
@rm -f .tmp/script-coverage*
|
||||||
|
|
|
@ -18,4 +18,4 @@ DIST=%(testbase)s/../..
|
||||||
BUILD=%(testbase)s/../../build
|
BUILD=%(testbase)s/../../build
|
||||||
TEST_DIFF_CANONIFIER=$SCRIPTS/diff-canonifier
|
TEST_DIFF_CANONIFIER=$SCRIPTS/diff-canonifier
|
||||||
TMPDIR=%(testbase)s/.tmp
|
TMPDIR=%(testbase)s/.tmp
|
||||||
# BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage
|
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# @TEST-EXEC: BROFILER_FILE=coverage bro -b %INPUT
|
# @TEST-EXEC: BRO_PROFILER_FILE=coverage bro -b %INPUT
|
||||||
# @TEST-EXEC: grep %INPUT coverage | sort -k2 >output
|
# @TEST-EXEC: grep %INPUT coverage | sort -k2 >output
|
||||||
# @TEST-EXEC: btest-diff output
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output
|
||||||
|
|
||||||
print "first";
|
print "first";
|
||||||
|
|
||||||
|
|
2
testing/external/subdir-btest.cfg
vendored
2
testing/external/subdir-btest.cfg
vendored
|
@ -17,4 +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
|
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# when collecting Bro script coverage statistics so that two independent
|
# when collecting Bro script coverage statistics so that two independent
|
||||||
# Bro processing don't try to write those usage statistics to the same file.
|
# Bro processing don't try to write those usage statistics to the same file.
|
||||||
|
|
||||||
BROFILER_FILE=`mktemp -t script-coverage` $BTEST_PATH/btest-bg-run $@
|
BRO_PROFILER_FILE=`mktemp $TMPDIR/script-coverage.XXXX` $BTEST_PATH/btest-bg-run $@
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue