@@ -89,8 +89,10 @@ def main(self):
89
89
parser = optparse .OptionParser (usage = "%prog [options]" )
90
90
parser .add_option ("--nocleanup" , dest = "nocleanup" , default = False , action = "store_true" ,
91
91
help = "Leave bitcoinds and test.* datadir on exit or error" )
92
+ parser .add_option ("--noshutdown" , dest = "noshutdown" , default = False , action = "store_true" ,
93
+ help = "Don't stop bitcoinds after the test execution" )
92
94
parser .add_option ("--srcdir" , dest = "srcdir" , default = "../../src" ,
93
- help = "Source directory containing bitcoind/bitcoin-cli (default: %default% )" )
95
+ help = "Source directory containing bitcoind/bitcoin-cli (default: %default)" )
94
96
parser .add_option ("--tmpdir" , dest = "tmpdir" , default = tempfile .mkdtemp (prefix = "test" ),
95
97
help = "Root directory for datadirs" )
96
98
parser .add_option ("--tracerpc" , dest = "trace_rpc" , default = False , action = "store_true" ,
@@ -128,10 +130,15 @@ def main(self):
128
130
print ("Unexpected exception caught during testing: " + str (e ))
129
131
traceback .print_tb (sys .exc_info ()[2 ])
130
132
131
- if not self .options .nocleanup :
132
- print ("Cleaning up " )
133
+ if not self .options .noshutdown :
134
+ print ("Stopping nodes " )
133
135
stop_nodes (self .nodes )
134
136
wait_bitcoinds ()
137
+ else :
138
+ print ("Note: bitcoinds were not stopped and may still be running" )
139
+
140
+ if not self .options .nocleanup and not self .options .noshutdown :
141
+ print ("Cleaning up" )
135
142
shutil .rmtree (self .options .tmpdir )
136
143
137
144
if success :
0 commit comments