@@ -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,11 +130,14 @@ 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
- print ("Stopping nodes" )
132
- stop_nodes (self .nodes )
133
- wait_bitcoinds ()
133
+ if not self .options .noshutdown :
134
+ print ("Stopping nodes" )
135
+ stop_nodes (self .nodes )
136
+ wait_bitcoinds ()
137
+ else :
138
+ print ("Note: bitcoinds were not stopped and may still be running" )
134
139
135
- if not self .options .nocleanup :
140
+ if not self .options .nocleanup and not self . options . noshutdown :
136
141
print ("Cleaning up" )
137
142
shutil .rmtree (self .options .tmpdir )
138
143
0 commit comments