aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-11-03 09:22:38 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-03 09:23:17 +0100
commit2a6972133f07382d13e08edc9c2e6c231689b2db (patch)
tree70dd887ead3967e1da0da825f3cb2af179ed1222 /qa/rpc-tests
parent7a9356bf16d3e21b99ce6badc88f949679f8e846 (diff)
parent2191eac812a72fe57167be882bddd2e6a3f0340e (diff)
Merge pull request #5185
2191eac add tests to travis (Cory Fields) 7667850 tests: replace the old (unused since Travis) tests with new rpc test scripts (Cory Fields) fa7f8cd tests: remove old pull-tester scripts (Cory Fields) 5122ea7 tests: fix forknotify.py on windows (Cory Fields) 7a41614 tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment (Cory Fields) f635269 tests: enable alertnotify test for Windows (Cory Fields)
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-xqa/rpc-tests/conflictedbalance.sh5
-rwxr-xr-xqa/rpc-tests/forknotify.py2
-rwxr-xr-xqa/rpc-tests/txnmall.sh5
-rw-r--r--qa/rpc-tests/util.py8
-rwxr-xr-xqa/rpc-tests/wallet.sh5
-rwxr-xr-xqa/rpc-tests/walletbackup.sh5
-rwxr-xr-xqa/rpc-tests/zapwallettxes.sh5
7 files changed, 20 insertions, 15 deletions
diff --git a/qa/rpc-tests/conflictedbalance.sh b/qa/rpc-tests/conflictedbalance.sh
index 71761321ed..a112244c74 100755
--- a/qa/rpc-tests/conflictedbalance.sh
+++ b/qa/rpc-tests/conflictedbalance.sh
@@ -18,13 +18,14 @@
if [ $# -lt 1 ]; then
echo "Usage: $0 path_to_binaries"
echo "e.g. $0 ../../src"
+ echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
exit 1
fi
set -f
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index a4c2dc944e..1d2c4a9966 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -23,7 +23,7 @@ class ForkNotifyTest(BitcoinTestFramework):
with open(self.alert_filename, 'w') as f:
pass # Just open then close to create zero-length file
self.nodes.append(start_node(0, self.options.tmpdir,
- ["-blockversion=2", "-alertnotify=echo %s >> '" + self.alert_filename + "'"]))
+ ["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]))
# Node1 mines block.version=211 blocks
self.nodes.append(start_node(1, self.options.tmpdir,
["-blockversion=211"]))
diff --git a/qa/rpc-tests/txnmall.sh b/qa/rpc-tests/txnmall.sh
index 035e7ee15f..1296d54d92 100755
--- a/qa/rpc-tests/txnmall.sh
+++ b/qa/rpc-tests/txnmall.sh
@@ -8,13 +8,14 @@
if [ $# -lt 1 ]; then
echo "Usage: $0 path_to_binaries"
echo "e.g. $0 ../../src"
+ echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
exit 1
fi
set -f
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 6d0b21c927..c895eb1619 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -85,11 +85,11 @@ def initialize_chain(test_dir):
# Create cache directories, run bitcoinds:
for i in range(4):
datadir=initialize_datadir("cache", i)
- args = [ "bitcoind", "-keypool=1", "-datadir="+datadir, "-discover=0" ]
+ args = [ os.getenv("BITCOIND", "bitcoind"), "-keypool=1", "-datadir="+datadir, "-discover=0" ]
if i > 0:
args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
bitcoind_processes[i] = subprocess.Popen(args)
- subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
+ subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir,
"-rpcwait", "getblockcount"], stdout=devnull)
devnull.close()
rpcs = []
@@ -150,11 +150,11 @@ def start_node(i, dir, extra_args=None, rpchost=None):
Start a bitcoind and return RPC connection to it
"""
datadir = os.path.join(dir, "node"+str(i))
- args = [ "bitcoind", "-datadir="+datadir, "-keypool=1", "-discover=0" ]
+ args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
if extra_args is not None: args.extend(extra_args)
bitcoind_processes[i] = subprocess.Popen(args)
devnull = open("/dev/null", "w+")
- subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
+ subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir] +
_rpchost_to_args(rpchost) +
["-rpcwait", "getblockcount"], stdout=devnull)
devnull.close()
diff --git a/qa/rpc-tests/wallet.sh b/qa/rpc-tests/wallet.sh
index bb5f34f590..c9ad0f2a78 100755
--- a/qa/rpc-tests/wallet.sh
+++ b/qa/rpc-tests/wallet.sh
@@ -8,13 +8,14 @@
if [ $# -lt 1 ]; then
echo "Usage: $0 path_to_binaries"
echo "e.g. $0 ../../src"
+ echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
exit 1
fi
set -f
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/walletbackup.sh b/qa/rpc-tests/walletbackup.sh
index ee11418bef..4af3d97f35 100755
--- a/qa/rpc-tests/walletbackup.sh
+++ b/qa/rpc-tests/walletbackup.sh
@@ -36,11 +36,12 @@
if [ $# -lt 1 ]; then
echo "Usage: $0 path_to_binaries"
echo "e.g. $0 ../../src"
+ echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
exit 1
fi
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/zapwallettxes.sh b/qa/rpc-tests/zapwallettxes.sh
index e6d490cccc..4312d84e94 100755
--- a/qa/rpc-tests/zapwallettxes.sh
+++ b/qa/rpc-tests/zapwallettxes.sh
@@ -8,13 +8,14 @@
if [ $# -lt 1 ]; then
echo "Usage: $0 path_to_binaries"
echo "e.g. $0 ../../src"
+ echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
exit 1
fi
set -f
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
DIR="${BASH_SOURCE%/*}"
SENDANDWAIT="${DIR}/send.sh"