From 17c506c26c474fc7f2bfbe341f0fa1f2c78361c8 Mon Sep 17 00:00:00 2001 From: Jannis Froese Date: Sat, 3 May 2014 21:22:55 +0200 Subject: [PATCH] make it possible to run coverage tests without java comparison tool --- Makefile.am | 7 +++++++ configure.ac | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index d0912c13d..8dc540abd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/configure.ac b/configure.ac index 88f151e30..4e3e0ea8b 100644 --- a/configure.ac +++ b/configure.ac @@ -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")])