aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2014-04-02 16:30:38 -0400
committerGavin Andresen <gavinandresen@gmail.com>2014-04-02 19:59:17 -0400
commitcb4bdd18a74470e190f552a2425c12c6e2f33138 (patch)
treea0194a1ba94f487da746e39a3dea5f88cd17d5ec /qa/rpc-tests
parent397521d632b4a49e61c8ea2246135f9cc00e57c4 (diff)
Have pull-tester run the listtransactions.py regression test
This should show how to run a python-based regression test successfully in the pull-tester environment.
Diffstat (limited to 'qa/rpc-tests')
-rw-r--r--qa/rpc-tests/util.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index fa0700f1c8..1d0896a3fb 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -65,6 +65,7 @@ def initialize_chain(test_dir):
"""
if not os.path.isdir(os.path.join("cache", "node0")):
+ devnull = open("/dev/null", "w+")
# Create cache directories, run bitcoinds:
for i in range(4):
datadir = os.path.join("cache", "node"+str(i))
@@ -79,9 +80,9 @@ def initialize_chain(test_dir):
if i > 0:
args.append("-connect=127.0.0.1:"+str(START_P2P_PORT))
bitcoind_processes.append(subprocess.Popen(args))
- subprocess.check_output([ "bitcoin-cli", "-datadir="+datadir,
- "-rpcwait", "getblockcount"])
-
+ subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
+ "-rpcwait", "getblockcount"], stdout=devnull)
+ devnull.close()
rpcs = []
for i in range(4):
try:
@@ -113,12 +114,14 @@ def initialize_chain(test_dir):
def start_nodes(num_nodes, dir):
# Start bitcoinds, and wait for RPC interface to be up and running:
+ devnull = open("/dev/null", "w+")
for i in range(num_nodes):
datadir = os.path.join(dir, "node"+str(i))
args = [ "bitcoind", "-datadir="+datadir ]
bitcoind_processes.append(subprocess.Popen(args))
- subprocess.check_output([ "bitcoin-cli", "-datadir="+datadir,
- "-rpcwait", "getblockcount"])
+ subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
+ "-rpcwait", "getblockcount"], stdout=devnull)
+ devnull.close()
# Create&return JSON-RPC connections
rpc_connections = []
for i in range(num_nodes):