Skip to content

Commit

Permalink
Make large-reorg tests optional in block-tester
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Oct 28, 2013
1 parent 95fa14d commit 47b9374
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Expand Up @@ -119,7 +119,7 @@ test_bitcoin_filtered.info: test_bitcoin.info

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 1 18444
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 18444
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
$(LCOV) -z -d $(abs_builddir)/src
$(LCOV) -z -d $(abs_builddir)/src/leveldb
Expand Down Expand Up @@ -148,7 +148,7 @@ endif
if USE_COMPARISON_TOOL
check-local:
$(MKDIR_P) qa/tmp
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 1 18444
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 18444
endif

EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
Expand Down
17 changes: 16 additions & 1 deletion configure.ac
Expand Up @@ -69,10 +69,15 @@ AC_ARG_ENABLE(tests,
[use_tests=yes])

AC_ARG_WITH([comparison-tool],
AS_HELP_STRING([with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
[use_comparison_tool=$withval],
[use_comparison_tool=no])

AC_ARG_ENABLE([comparison-tool-reorg-tests],
AS_HELP_STRING([--enable-comparison-tool-reorg-tests],[enable expensive reorg tests in the comparison tool (default no)]),
[use_comparison_tool_reorg_tests=$enableval],
[use_comparison_tool_reorg_tests=no])

AC_ARG_WITH([qrencode],
[AS_HELP_STRING([--with-qrencode],
[enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
Expand Down Expand Up @@ -235,6 +240,15 @@ if test x$use_comparison_tool != xno; then
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
fi

if test x$use_comparison_tool_reorg_tests != xno; then
if test x$use_comparison_tool == x; then
AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
fi
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
else
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
fi

if test x$use_lcov == xyes; then
if test x$LCOV == x; then
AC_MSG_ERROR("lcov testing requested but lcov not found")
Expand Down Expand Up @@ -678,6 +692,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])

AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
Expand Down
11 changes: 8 additions & 3 deletions qa/pull-tester/build-tests.sh.in
Expand Up @@ -9,8 +9,9 @@ set -o xtrace

MINGWPREFIX=$1
JAVA_COMPARISON_TOOL=$2
JOBS=${3-1}
OUT_DIR=${4-}
RUN_LARGE_REORGS=$3
JOBS=${4-1}
OUT_DIR=${5-}

if [ $# -lt 2 ]; then
echo "Usage: $0 [mingw-prefix] [java-comparison-tool] <make jobs> <save output dir>"
Expand All @@ -32,7 +33,11 @@ cd @abs_top_srcdir@
make distdir
mv $DISTDIR linux-build
cd linux-build
./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
if [ $RUN_LARGE_REORGS = 1 ]; then
./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests
else
./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
fi
make -j$JOBS

# link interesting binaries to parent out/ directory, if it exists. Do this before
Expand Down

0 comments on commit 47b9374

Please sign in to comment.