From c58f775cc29736c5dbb8cce74b482147bb7f5e09 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 3 Jan 2019 12:19:46 +0300 Subject: [PATCH] De-dashify env vars and dashify help text in tests instead (#2603) --- qa/rpc-tests/maxblocksinflight.py | 2 +- qa/rpc-tests/p2p-acceptblock.py | 4 ++-- qa/rpc-tests/test_framework/test_framework.py | 8 ++++---- qa/rpc-tests/test_framework/util.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qa/rpc-tests/maxblocksinflight.py b/qa/rpc-tests/maxblocksinflight.py index c035269db6..8374537e02 100755 --- a/qa/rpc-tests/maxblocksinflight.py +++ b/qa/rpc-tests/maxblocksinflight.py @@ -73,7 +73,7 @@ class TestManager(NodeConnCB): class MaxBlocksInFlightTest(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--testbinary", dest="testbinary", - default=os.getenv("DASHD", "dashd"), + default=os.getenv("BITCOIND", "dashd"), help="Binary to test max block requests behavior") def __init__(self): diff --git a/qa/rpc-tests/p2p-acceptblock.py b/qa/rpc-tests/p2p-acceptblock.py index fa26bf3a6a..4899b0c46c 100755 --- a/qa/rpc-tests/p2p-acceptblock.py +++ b/qa/rpc-tests/p2p-acceptblock.py @@ -108,8 +108,8 @@ class TestNode(NodeConnCB): class AcceptBlockTest(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--testbinary", dest="testbinary", - default=os.getenv("DASHD", "dashd"), - help="bitcoind binary to test") + default=os.getenv("BITCOIND", "dashd"), + help="dashd binary to test") def __init__(self): super().__init__() diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index fbff894288..b2d7bd9f8b 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -392,11 +392,11 @@ class ComparisonTestFramework(BitcoinTestFramework): def add_options(self, parser): parser.add_option("--testbinary", dest="testbinary", - default=os.getenv("DASHD", "dashd"), - help="bitcoind binary to test") + default=os.getenv("BITCOIND", "dashd"), + help="dashd binary to test") parser.add_option("--refbinary", dest="refbinary", - default=os.getenv("DASHD", "dashd"), - help="bitcoind binary to use for reference nodes (if any)") + default=os.getenv("BITCOIND", "dashd"), + help="dashd binary to use for reference nodes (if any)") def setup_network(self): self.nodes = start_nodes( diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 48f58ddafe..1622abeecc 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -274,7 +274,7 @@ def initialize_chain(test_dir, num_nodes, cachedir, extra_args=None, redirect_st # Create cache directories, run dashds: for i in range(MAX_NODES): datadir=initialize_datadir(cachedir, i) - args = [ os.getenv("DASHD", "dashd"), "-server", "-keypool=1", "-datadir="+datadir, "-discover=0", "-mocktime="+str(GENESISTIME) ] + args = [ os.getenv("BITCOIND", "dashd"), "-server", "-keypool=1", "-datadir="+datadir, "-discover=0", "-mocktime="+str(GENESISTIME) ] if i > 0: args.append("-connect=127.0.0.1:"+str(p2p_port(0))) if extra_args is not None: @@ -362,7 +362,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary= """ datadir = os.path.join(dirname, "node"+str(i)) if binary is None: - binary = os.getenv("DASHD", "dashd") + binary = os.getenv("BITCOIND", "dashd") # RPC tests still depend on free transactions args = [ binary, "-datadir="+datadir, "-server", "-keypool=1", "-discover=0", "-rest", "-blockprioritysize=50000", "-mocktime="+str(get_mocktime()) ] # Don't try auto backups (they fail a lot when running tests)