aboutsummaryrefslogtreecommitdiff
path: root/qa/pull-tester
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2013-10-28 03:41:40 -0400
committerMatt Corallo <git@bluematt.me>2013-10-28 03:43:09 -0400
commitf1f72e535c8aa95e5d23a5d5b088c375aa27ee03 (patch)
tree6dd3abff26636c7e807277a47382063d56f98f87 /qa/pull-tester
parenta18a408067229d2474dc7e88ef8b074b5c48cb95 (diff)
downloadbitcoin-f1f72e535c8aa95e5d23a5d5b088c375aa27ee03.tar.xz
Fix port binding by listening on port $BASHPID
Diffstat (limited to 'qa/pull-tester')
-rwxr-xr-xqa/pull-tester/run-bitcoind-for-test.sh.in7
1 files changed, 4 insertions, 3 deletions
diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index e8bcb4bf7a..4eef8202ca 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -5,7 +5,8 @@ mkdir -p "$DATADIR"/regtest
touch "$DATADIR/regtest/debug.log"
tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
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=$!
#Install a watchdog.
@@ -13,10 +14,10 @@ BITCOIND=$!
wait $WAITER
if [ -n "$TIMEOUT" ]; then
- timeout "$TIMEOUT"s "$@"
+ timeout "$TIMEOUT"s "$@" $PORT
RETURN=$?
else
- "$@"
+ "$@" $PORT
RETURN=$?
fi