Skip to content

Commit 6759a24

Browse files
committed
Merge #11472: qa: Make tmpdir option an absolute path, misc cleanup
fafa003 qa: Remove never used return value of sync_with_ping (MarcoFalke) fa9de37 qa: Make tmpdir option an absolute path (MarcoFalke) Pull request description: This should fix issues with the multiwallet test and its symlinks when the tmpdir is a relative path. Rather than fixing os.symlink to work with paths relative to a directory descriptor, which does not work on Windows, normalize the path instead. Tree-SHA512: 189690f3d065ea2f0f48e06775c86d513d0916c7c86312432e8e16df160e65539e288c2bd53d49a4180735fa940f6fcd52b506ccd7d9815651a9b1a69850dda6
2 parents 50d72b3 + fafa003 commit 6759a24

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

test/functional/p2p-acceptblock.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ def run_test(self):
103103
test_node.send_message(msg_block(blocks_h2[0]))
104104
white_node.send_message(msg_block(blocks_h2[1]))
105105

106-
[ x.sync_with_ping() for x in [test_node, white_node] ]
106+
for x in [test_node, white_node]:
107+
x.sync_with_ping()
107108
assert_equal(self.nodes[0].getblockcount(), 2)
108109
assert_equal(self.nodes[1].getblockcount(), 2)
109110
self.log.info("First height 2 block accepted by both nodes")
@@ -116,7 +117,8 @@ def run_test(self):
116117
test_node.send_message(msg_block(blocks_h2f[0]))
117118
white_node.send_message(msg_block(blocks_h2f[1]))
118119

119-
[ x.sync_with_ping() for x in [test_node, white_node] ]
120+
for x in [test_node, white_node]:
121+
x.sync_with_ping()
120122
for x in self.nodes[0].getchaintips():
121123
if x['hash'] == blocks_h2f[0].hash:
122124
assert_equal(x['status'], "headers-only")
@@ -135,7 +137,8 @@ def run_test(self):
135137
test_node.send_message(msg_block(blocks_h3[0]))
136138
white_node.send_message(msg_block(blocks_h3[1]))
137139

138-
[ x.sync_with_ping() for x in [test_node, white_node] ]
140+
for x in [test_node, white_node]:
141+
x.sync_with_ping()
139142
# Since the earlier block was not processed by node0, the new block
140143
# can't be fully validated.
141144
for x in self.nodes[0].getchaintips():

test/functional/test_framework/mininode.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,6 @@ def sync_with_ping(self, timeout=60):
16151615
test_function = lambda: self.last_message.get("pong") and self.last_message["pong"].nonce == self.ping_counter
16161616
wait_until(test_function, timeout=timeout, lock=mininode_lock)
16171617
self.ping_counter += 1
1618-
return True
16191618

16201619
# The actual NodeConn class
16211620
# This class provides an interface for a p2p connection to a specified node

test/functional/test_framework/test_framework.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ def main(self):
102102

103103
check_json_precision()
104104

105+
self.options.cachedir = os.path.abspath(self.options.cachedir)
106+
105107
# Set up temp directory and start logging
106108
if self.options.tmpdir:
109+
self.options.tmpdir = os.path.abspath(self.options.tmpdir)
107110
os.makedirs(self.options.tmpdir, exist_ok=False)
108111
else:
109112
self.options.tmpdir = tempfile.mkdtemp(prefix="test")

0 commit comments

Comments
 (0)