mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
remove root test directory for RPC tests
This commit is contained in:
parent
6f939c9080
commit
438e94dc33
@ -125,7 +125,8 @@ class BitcoinTestFramework(object):
|
|||||||
self.add_options(parser)
|
self.add_options(parser)
|
||||||
(self.options, self.args) = parser.parse_args()
|
(self.options, self.args) = parser.parse_args()
|
||||||
|
|
||||||
self.options.tmpdir += '/' + str(self.options.port_seed)
|
# backup dir variable for removal at cleanup
|
||||||
|
self.options.root, self.options.tmpdir = self.options.tmpdir, self.options.tmpdir + '/' + str(self.options.port_seed)
|
||||||
|
|
||||||
if self.options.trace_rpc:
|
if self.options.trace_rpc:
|
||||||
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
|
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
|
||||||
@ -176,6 +177,8 @@ class BitcoinTestFramework(object):
|
|||||||
if not self.options.nocleanup and not self.options.noshutdown and success:
|
if not self.options.nocleanup and not self.options.noshutdown and success:
|
||||||
print("Cleaning up")
|
print("Cleaning up")
|
||||||
shutil.rmtree(self.options.tmpdir)
|
shutil.rmtree(self.options.tmpdir)
|
||||||
|
if not os.listdir(self.options.root):
|
||||||
|
os.rmdir(self.options.root)
|
||||||
else:
|
else:
|
||||||
print("Not cleaning up dir %s" % self.options.tmpdir)
|
print("Not cleaning up dir %s" % self.options.tmpdir)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user