zeek/testing/coverage
Tim Wojtulewicz a05356eb79 Add a script to cleanup the file listing before sending to Coveralls
GCC has a "feature" where it doesn't realize that files in the
src/zeek/... tree are the same as files in the normal 'src/' tree. This
leads the coverage script to send duplicates to Coveralls and pollute
the display with them. The new script scrapes the intermediate output
from lcov and de-duplicates anything in src/zeek/ to be just from src/.
2021-02-09 23:07:47 +00:00
..
code_coverage.sh More bro-to-zeek renaming in the unit tests 2019-05-16 02:27:54 -05:00
coverage_cleanup.py Add a script to cleanup the file listing before sending to Coveralls 2021-02-09 23:07:47 +00:00
lcov_html.sh Add a script to cleanup the file listing before sending to Coveralls 2021-02-09 23:07:47 +00:00
Makefile Add support for sending data to coveralls with lcov_html.sh via Cirrus 2020-10-21 21:55:30 +00:00
README More bro-to-zeek renaming in the unit tests 2019-05-16 02:27:54 -05:00

On a Zeek build configured with --enable-coverage, this script produces a code
coverage report after Zeek has been invoked. The intended application of this
script is after the btest testsuite has run. This combination (btests first,
coverage computation afterward) happens automatically when running "make" in
the testing directory.  This script puts .gcov files (which are included in
.gitignore) alongside the corresponding source files.

This depends on gcov, which should come with your gcc. If gcov is not
installed, the script will abort with an error message.

After `make all` in the upper directory, use `make html` as make target in this
directory to output the html files that lcov can create. By default, the html
files will be contained in a directory named "coverage-html" in the base
directory. To set a custom name, use `make html
COVERAGE_HTML_DIR=custom-dir-name`.

The script code_coverage.sh is triggered by `make coverage` (included in `make`
in /testing), and its goal is to automate code coverage testing.

The script lcov_html.sh is triggered by `make html`, and its goal is to create
html files from the aforementioned coverage data.