The RPC tests (via `qa/pull-tester/rpc-tests.py`) are now executed,
when gathering code coverage data, for example with `make cov`.
Generating coverage data requires `lcov`, which can installed with:
sudo apt-get install lcov
To also use the BitcoinJ tests, get the test tool:
TOOL_URL=https://github.com/theuni/bitcoind-comparisontool/raw/master/pull-tests-8c6666f.jar
TOOL_HASH=a865332b3827abcde684ab79f5f43c083b0b6a4c97ff5508c79f29fee24f11cd
wget $TOOL_URL -O ./share/BitcoindComparisonTool.jar
echo "$TOOL_HASH ./share/BitcoindComparisonTool.jar" | shasum --algorithm 256 --check
The coverage data can be generated with:
./autogen.sh
./configure --enable-lcov --with-comparison-tool=./share/BitcoindComparisonTool.jar
make
make cov
Optionally the options `--enable-extended-rpc-tests` and
`--enable-comparison-tool-reorg-tests` may be used to enable more time
consuming tests.
It then runs the tests and generates two HTML reports:
- test_bitcoin.coverage/index.html
- total.coverage/index.html
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@|$(GREP)"\%"|$(AWK)'{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -a rpc_test_filtered.info -o $@|$(GREP)"\%"|$(AWK)'{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt