From 1ad933950884ae3411cce78e3b8e92e9a649e735 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Tue, 24 May 2016 11:35:06 -0400 Subject: [PATCH] Test framework: only cleanup on successful test runs --- qa/rpc-tests/test_framework/test_framework.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index b9b803429..49f419226 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -165,9 +165,11 @@ class BitcoinTestFramework(object): else: print("Note: bitcoinds were not stopped and may still be running") - if not self.options.nocleanup and not self.options.noshutdown: + if not self.options.nocleanup and not self.options.noshutdown and success: print("Cleaning up") shutil.rmtree(self.options.tmpdir) + else: + print("Not cleaning up dir %s" % self.options.tmpdir) if success: print("Tests successful")