Skip to content

Commit 47b9374

Browse files
committed
Make large-reorg tests optional in block-tester
1 parent 95fa14d commit 47b9374

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ test_bitcoin_filtered.info: test_bitcoin.info
119119

120120
block_test.info: test_bitcoin_filtered.info
121121
$(MKDIR_P) qa/tmp
122-
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 1 18444
122+
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 18444
123123
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
124124
$(LCOV) -z -d $(abs_builddir)/src
125125
$(LCOV) -z -d $(abs_builddir)/src/leveldb
@@ -148,7 +148,7 @@ endif
148148
if USE_COMPARISON_TOOL
149149
check-local:
150150
$(MKDIR_P) qa/tmp
151-
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 1 18444
151+
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 18444
152152
endif
153153

154154
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING)

configure.ac

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,15 @@ AC_ARG_ENABLE(tests,
6969
[use_tests=yes])
7070

7171
AC_ARG_WITH([comparison-tool],
72-
AS_HELP_STRING([with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
72+
AS_HELP_STRING([--with-comparison-tool],[path to java comparison tool (requires --enable-tests)]),
7373
[use_comparison_tool=$withval],
7474
[use_comparison_tool=no])
7575

76+
AC_ARG_ENABLE([comparison-tool-reorg-tests],
77+
AS_HELP_STRING([--enable-comparison-tool-reorg-tests],[enable expensive reorg tests in the comparison tool (default no)]),
78+
[use_comparison_tool_reorg_tests=$enableval],
79+
[use_comparison_tool_reorg_tests=no])
80+
7681
AC_ARG_WITH([qrencode],
7782
[AS_HELP_STRING([--with-qrencode],
7883
[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
235240
AC_SUBST(JAVA_COMPARISON_TOOL, $use_comparison_tool)
236241
fi
237242

243+
if test x$use_comparison_tool_reorg_tests != xno; then
244+
if test x$use_comparison_tool == x; then
245+
AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
246+
fi
247+
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
248+
else
249+
AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
250+
fi
251+
238252
if test x$use_lcov == xyes; then
239253
if test x$LCOV == x; then
240254
AC_MSG_ERROR("lcov testing requested but lcov not found")
@@ -678,6 +692,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
678692
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
679693
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
680694
AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
695+
AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
681696

682697
AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
683698
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])

qa/pull-tester/build-tests.sh.in

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ set -o xtrace
99

1010
MINGWPREFIX=$1
1111
JAVA_COMPARISON_TOOL=$2
12-
JOBS=${3-1}
13-
OUT_DIR=${4-}
12+
RUN_LARGE_REORGS=$3
13+
JOBS=${4-1}
14+
OUT_DIR=${5-}
1415

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

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

0 commit comments

Comments
 (0)