File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
qa/rpc-tests/test_framework Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,8 @@ def main(self):
125
125
self .add_options (parser )
126
126
(self .options , self .args ) = parser .parse_args ()
127
127
128
- self .options .tmpdir += '/' + str (self .options .port_seed )
128
+ # backup dir variable for removal at cleanup
129
+ self .options .root , self .options .tmpdir = self .options .tmpdir , self .options .tmpdir + '/' + str (self .options .port_seed )
129
130
130
131
if self .options .trace_rpc :
131
132
logging .basicConfig (level = logging .DEBUG , stream = sys .stdout )
@@ -176,6 +177,8 @@ def main(self):
176
177
if not self .options .nocleanup and not self .options .noshutdown and success :
177
178
print ("Cleaning up" )
178
179
shutil .rmtree (self .options .tmpdir )
180
+ if not os .listdir (self .options .root ):
181
+ os .rmdir (self .options .root )
179
182
else :
180
183
print ("Not cleaning up dir %s" % self .options .tmpdir )
181
184
You can’t perform that action at this time.
0 commit comments