make it possible to run coverage tests without java comparison tool

This commit is contained in:
Jannis Froese 2014-05-03 21:22:55 +02:00
parent 5e2a4570e3
commit 17c506c26c
2 changed files with 13 additions and 6 deletions

View file

@ -117,6 +117,7 @@ test_bitcoin.info: baseline_filtered_combined.info
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")])