Skip to content

Commit

Permalink
De-dashify env vars and dashify help text in tests instead (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
UdjinM6 authored Jan 3, 2019
1 parent a49f412 commit c58f775
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion qa/rpc-tests/maxblocksinflight.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run(self):
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):
Expand Down
4 changes: 2 additions & 2 deletions qa/rpc-tests/p2p-acceptblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def sync_with_ping(self, timeout=30):
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__()
Expand Down
8 changes: 4 additions & 4 deletions qa/rpc-tests/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,11 @@ def __init__(self):

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(
Expand Down
4 changes: 2 additions & 2 deletions qa/rpc-tests/test_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c58f775

Please sign in to comment.