diff --git a/CHANGES b/CHANGES index 94633388fe..e40230bf25 100644 --- a/CHANGES +++ b/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 * BiF cleanup (Matthias Vallentin) diff --git a/VERSION b/VERSION index d971e16fee..f5351d6ef2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0-20 +2.0-36 diff --git a/testing/Makefile b/testing/Makefile index 7a70748845..f65d5a1fef 100644 --- a/testing/Makefile +++ b/testing/Makefile @@ -12,8 +12,8 @@ make-brief: @for repo in $(DIRS); do (cd $$repo && make brief ); done coverage: - @cp btest/coverage.log `mktemp brocov.tmp.XXX` - @for f in external/*/coverage.log; do cp $$f `mktemp brocov.tmp.XXX`; done + @test -f btest/coverage.log && cp btest/coverage.log `mktemp brocov.tmp.XXX` || true + @for f in external/*/coverage.log; do test -f $$f && cp $$f `mktemp brocov.tmp.XXX` || true; done @echo "Complete test suite code coverage:" @./scripts/coverage-calc "brocov.tmp.*" coverage.log `pwd`/../scripts @rm -f brocov.tmp.* diff --git a/testing/btest/Makefile b/testing/btest/Makefile index e764dd2b15..a2ca30609a 100644 --- a/testing/btest/Makefile +++ b/testing/btest/Makefile @@ -2,14 +2,16 @@ DIAG=diag.log BTEST=../../aux/btest/btest -all: +all: cleanup # Showing all tests. - @rm -f $(DIAG) - @rm -f .tmp/script-coverage* @$(BTEST) -f $(DIAG) @../scripts/coverage-calc ".tmp/script-coverage*" coverage.log `pwd`/../../scripts -brief: +brief: cleanup # Brief output showing only failed tests. - @rm -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* diff --git a/testing/scripts/btest-bg-run b/testing/scripts/btest-bg-run index ec5497da7d..64a38b9759 100755 --- a/testing/scripts/btest-bg-run +++ b/testing/scripts/btest-bg-run @@ -4,4 +4,4 @@ # 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_PROFILER_FILE=`mktemp -t script-coverage` $BTEST_PATH/btest-bg-run $@ +BRO_PROFILER_FILE=`mktemp $TMPDIR/script-coverage.XXXX` $BTEST_PATH/btest-bg-run $@