diff options
| author | whythat <[email protected]> | 2016-09-02 12:38:04 +0300 |
|---|---|---|
| committer | whythat <[email protected]> | 2016-09-05 02:00:43 +0300 |
| commit | 438e94dc330a37600ec1d86f2ba8502385b5262d (patch) | |
| tree | 198645346bc0c791d379256aeea33b8aecfcf384 /qa/rpc-tests/test_framework | |
| parent | Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/ (diff) | |
| download | discoin-438e94dc330a37600ec1d86f2ba8502385b5262d.tar.xz discoin-438e94dc330a37600ec1d86f2ba8502385b5262d.zip | |
remove root test directory for RPC tests
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 a1383729f..186cf866c 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) |