diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-09-13 11:59:07 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-09-13 12:00:15 +0200 |
commit | 7fe6c5c993706e8395cdaf7977bee793c06f48f3 (patch) | |
tree | 31b05b44167fcc3c12a6484e385757c35671e795 /qa/rpc-tests/test_framework | |
parent | 37ac67816afbefe88806e0325b8d3719c411183e (diff) | |
parent | c62cc4ec759a8487373f158b3cbb888efcdd753a (diff) | |
download | bitcoin-7fe6c5c993706e8395cdaf7977bee793c06f48f3.tar.xz |
Merge #8652: [qa]: remove root test directory for RPC tests
c62cc4e fix path for bak file (whythat)
438e94d remove root test directory for RPC tests (whythat)
Diffstat (limited to 'qa/rpc-tests/test_framework')
-rwxr-xr-x | qa/rpc-tests/test_framework/test_framework.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py index a1383729fa..186cf866cf 100755 --- a/qa/rpc-tests/test_framework/test_framework.py +++ b/qa/rpc-tests/test_framework/test_framework.py @@ -125,7 +125,8 @@ class BitcoinTestFramework(object): self.add_options(parser) (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: 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: print("Cleaning up") shutil.rmtree(self.options.tmpdir) + if not os.listdir(self.options.root): + os.rmdir(self.options.root) else: print("Not cleaning up dir %s" % self.options.tmpdir) |