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):
125125 self .add_options (parser )
126126 (self .options , self .args ) = parser .parse_args ()
127127
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 )
129130
130131 if self .options .trace_rpc :
131132 logging .basicConfig (level = logging .DEBUG , stream = sys .stdout )
@@ -176,6 +177,8 @@ def main(self):
176177 if not self .options .nocleanup and not self .options .noshutdown and success :
177178 print ("Cleaning up" )
178179 shutil .rmtree (self .options .tmpdir )
180+ if not os .listdir (self .options .root ):
181+ os .rmdir (self .options .root )
179182 else :
180183 print ("Not cleaning up dir %s" % self .options .tmpdir )
181184
You can’t perform that action at this time.
0 commit comments