Merge pull request #501 from leofidus/coverage-tests

Coverage tests
This commit is contained in:
langerhans 2014-05-04 16:52:28 +02:00
commit cec014e710
2 changed files with 14 additions and 7 deletions

View file

@ -110,13 +110,14 @@ baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtere
test_bitcoin.info: baseline_filtered_combined.info
$(MAKE) -C src/ check
$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
$(LCOV) -c -d $(abs_builddir)/src -t test_dogecoin -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" -o $@
if USE_COMPARISON_TOOL
block_test.info: test_bitcoin_filtered.info
$(MKDIR_P) qa/tmp
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
@ -126,12 +127,18 @@ block_test.info: test_bitcoin_filtered.info
block_test_filtered.info: block_test.info
$(LCOV) -r $< "/usr/include/*" -o $@
endif
test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
if USE_COMPARISON_TOOL
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
$(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
else
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
endif
test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
$(GENHTML) -s $< -o $(@D)

View file

@ -266,15 +266,15 @@ if test x$use_lcov == xyes; then
if test x$GCOV == x; then
AC_MSG_ERROR("lcov testing requested but gcov not found")
fi
if test x$JAVA == x; then
AC_MSG_ERROR("lcov testing requested but java not found")
fi
#if test x$JAVA == x; then
# AC_MSG_ERROR("lcov testing requested but java not found")
#fi
if test x$GENHTML == x; then
AC_MSG_ERROR("lcov testing requested but genhtml not found")
fi
if test x$use_comparison_tool == x; then
AC_MSG_ERROR("lcov testing requested but comparison tool was not specified")
fi
#if test x$use_comparison_tool == x; then
# AC_MSG_ERROR("lcov testing requested but comparison tool was not specified")
#fi
LCOV="$LCOV --gcov-tool=$GCOV"
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])