Skip to content

Commit 10c0e52

Browse files
committed
Merge pull request #6548
060058e Enable python tests for Native Windows (ptschip)
2 parents af9305a + 060058e commit 10c0e52

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ endif
204204

205205
dist_noinst_SCRIPTS = autogen.sh
206206

207-
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
207+
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
208208

209209
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
210210

qa/pull-tester/rpc-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ CURDIR=$(cd $(dirname "$0"); pwd)
55
# Get BUILDDIR and REAL_BITCOIND
66
. "${CURDIR}/tests-config.sh"
77

8-
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
98
export BITCOIND=${REAL_BITCOIND}
9+
export BITCOINCLI=${REAL_BITCOINCLI}
1010

1111
#Run the tests
1212

qa/pull-tester/run-bitcoin-cli

Lines changed: 0 additions & 13 deletions
This file was deleted.

qa/rpc-tests/test_framework/util.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,17 @@ def initialize_chain(test_dir):
7878
bitcoind and bitcoin-cli must be in search path.
7979
"""
8080

81-
if not os.path.isdir(os.path.join("cache", "node0")):
82-
devnull = open("/dev/null", "w+")
81+
if (not os.path.isdir(os.path.join("cache","node0"))
82+
or not os.path.isdir(os.path.join("cache","node1"))
83+
or not os.path.isdir(os.path.join("cache","node2"))
84+
or not os.path.isdir(os.path.join("cache","node3"))):
85+
86+
#find and delete old cache directories if any exist
87+
for i in range(4):
88+
if os.path.isdir(os.path.join("cache","node"+str(i))):
89+
shutil.rmtree(os.path.join("cache","node"+str(i)))
90+
91+
devnull = open(os.devnull, "w")
8392
# Create cache directories, run bitcoinds:
8493
for i in range(4):
8594
datadir=initialize_datadir("cache", i)
@@ -171,7 +180,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
171180
args = [ binary, "-datadir="+datadir, "-keypool=1", "-discover=0", "-rest" ]
172181
if extra_args is not None: args.extend(extra_args)
173182
bitcoind_processes[i] = subprocess.Popen(args)
174-
devnull = open("/dev/null", "w+")
183+
devnull = open(os.devnull, "w")
175184
if os.getenv("PYTHON_DEBUG", ""):
176185
print "start_node: bitcoind started, calling bitcoin-cli -rpcwait getblockcount"
177186
subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir] +

0 commit comments

Comments
 (0)