mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-06 16:36:57 +02:00
qa: Make tmpdir option an absolute path
This should fix issues with the multiwallet test and 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.
This commit is contained in:
@ -102,8 +102,11 @@ class BitcoinTestFramework(object):
|
|||||||
|
|
||||||
check_json_precision()
|
check_json_precision()
|
||||||
|
|
||||||
|
self.options.cachedir = os.path.abspath(self.options.cachedir)
|
||||||
|
|
||||||
# Set up temp directory and start logging
|
# Set up temp directory and start logging
|
||||||
if self.options.tmpdir:
|
if self.options.tmpdir:
|
||||||
|
self.options.tmpdir = os.path.abspath(self.options.tmpdir)
|
||||||
os.makedirs(self.options.tmpdir, exist_ok=False)
|
os.makedirs(self.options.tmpdir, exist_ok=False)
|
||||||
else:
|
else:
|
||||||
self.options.tmpdir = tempfile.mkdtemp(prefix="test")
|
self.options.tmpdir = tempfile.mkdtemp(prefix="test")
|
||||||
|
Reference in New Issue
Block a user