Skip to content

Commit 1ad9339

Browse files
committed
Test framework: only cleanup on successful test runs
1 parent 77b49ac commit 1ad9339

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

qa/rpc-tests/test_framework/test_framework.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ def main(self):
165165
else:
166166
print("Note: bitcoinds were not stopped and may still be running")
167167

168-
if not self.options.nocleanup and not self.options.noshutdown:
168+
if not self.options.nocleanup and not self.options.noshutdown and success:
169169
print("Cleaning up")
170170
shutil.rmtree(self.options.tmpdir)
171+
else:
172+
print("Not cleaning up dir %s" % self.options.tmpdir)
171173

172174
if success:
173175
print("Tests successful")

0 commit comments

Comments
 (0)