Fix port binding by listening on port $BASHPID
This commit is contained in:
parent
a18a408067
commit
f1f72e535c
2 changed files with 6 additions and 5 deletions
|
@ -119,7 +119,7 @@ test_bitcoin_filtered.info: test_bitcoin.info
|
||||||
|
|
||||||
block_test.info: test_bitcoin_filtered.info
|
block_test.info: test_bitcoin_filtered.info
|
||||||
$(MKDIR_P) qa/tmp
|
$(MKDIR_P) qa/tmp
|
||||||
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0 18444
|
-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
|
||||||
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
|
$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
|
||||||
$(LCOV) -z -d $(abs_builddir)/src
|
$(LCOV) -z -d $(abs_builddir)/src
|
||||||
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
$(LCOV) -z -d $(abs_builddir)/src/leveldb
|
||||||
|
@ -148,7 +148,7 @@ endif
|
||||||
if USE_COMPARISON_TOOL
|
if USE_COMPARISON_TOOL
|
||||||
check-local:
|
check-local:
|
||||||
$(MKDIR_P) qa/tmp
|
$(MKDIR_P) qa/tmp
|
||||||
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 18444
|
@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
|
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
|
||||||
|
|
|
@ -5,7 +5,8 @@ mkdir -p "$DATADIR"/regtest
|
||||||
touch "$DATADIR/regtest/debug.log"
|
touch "$DATADIR/regtest/debug.log"
|
||||||
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
|
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
|
||||||
WAITER=$!
|
WAITER=$!
|
||||||
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=18444 -regtest &
|
PORT=`expr $BASHPID + 10000`
|
||||||
|
"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -regtest &
|
||||||
BITCOIND=$!
|
BITCOIND=$!
|
||||||
|
|
||||||
#Install a watchdog.
|
#Install a watchdog.
|
||||||
|
@ -13,10 +14,10 @@ BITCOIND=$!
|
||||||
wait $WAITER
|
wait $WAITER
|
||||||
|
|
||||||
if [ -n "$TIMEOUT" ]; then
|
if [ -n "$TIMEOUT" ]; then
|
||||||
timeout "$TIMEOUT"s "$@"
|
timeout "$TIMEOUT"s "$@" $PORT
|
||||||
RETURN=$?
|
RETURN=$?
|
||||||
else
|
else
|
||||||
"$@"
|
"$@" $PORT
|
||||||
RETURN=$?
|
RETURN=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue