aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2013-10-28 01:16:41 -0400
committerMatt Corallo <git@bluematt.me>2013-10-28 01:16:41 -0400
commit47b9374e39a00d6e981aa1f4d0175d9426d91ac8 (patch)
tree3f5c66dc6bdfba373ba194a9d28db307236222ef
parent95fa14da69b6345f087991ceedcc34c73e66bab8 (diff)
Make large-reorg tests optional in block-tester
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac17
-rwxr-xr-xqa/pull-tester/build-tests.sh.in11
3 files changed, 26 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index e5bc9b99c6..bb950ee9f1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
@@ -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)
diff --git a/configure.ac b/configure.ac
index 905acd573c..f6d870f332 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)])],
@@ -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")
@@ -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])
diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in
index 392ff12dc6..9640bcaf67 100755
--- a/qa/pull-tester/build-tests.sh.in
+++ b/qa/pull-tester/build-tests.sh.in
@@ -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>"
@@ -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