Skip to content

Commit fa0dc09

Browse files
author
MarcoFalke
committed
test: Remove --noshutdown flag
1 parent fad441f commit fa0dc09

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ def parse_args(self, test_file):
171171
parser = argparse.ArgumentParser(usage="%(prog)s [options]")
172172
parser.add_argument("--nocleanup", dest="nocleanup", default=False, action="store_true",
173173
help="Leave bitcoinds and test.* datadir on exit or error")
174-
parser.add_argument("--noshutdown", dest="noshutdown", default=False, action="store_true",
175-
help="Don't stop bitcoinds after the test execution")
176174
parser.add_argument("--cachedir", dest="cachedir", default=os.path.abspath(os.path.dirname(test_file) + "/../cache"),
177175
help="Directory for caching pregenerated datadirs (default: %(default)s)")
178176
parser.add_argument("--tmpdir", dest="tmpdir", help="Root directory for datadirs (must not exist)")
@@ -325,18 +323,12 @@ def shutdown(self):
325323

326324
self.log.debug('Closing down network thread')
327325
self.network_thread.close()
328-
if not self.options.noshutdown:
329-
self.log.info("Stopping nodes")
330-
if self.nodes:
331-
self.stop_nodes()
332-
else:
333-
for node in self.nodes:
334-
node.cleanup_on_exit = False
335-
self.log.info("Note: bitcoinds were not stopped and may still be running")
326+
self.log.info("Stopping nodes")
327+
if self.nodes:
328+
self.stop_nodes()
336329

337330
should_clean_up = (
338331
not self.options.nocleanup and
339-
not self.options.noshutdown and
340332
self.success != TestStatus.FAILED and
341333
not self.options.perf
342334
)

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ def __init__(self, i, datadir_path, *, chain, rpchost, timewait, timeout_factor,
159159
self.rpc = None
160160
self.url = None
161161
self.log = logging.getLogger('TestFramework.node%d' % i)
162-
self.cleanup_on_exit = True # Whether to kill the node when this object goes away
163162
# Cache perf subprocesses here by their data output filename.
164163
self.perf_subprocesses = {}
165164

@@ -201,7 +200,7 @@ def _raise_assertion_error(self, msg: str):
201200
def __del__(self):
202201
# Ensure that we don't leave any bitcoind processes lying around after
203202
# the test ends
204-
if self.process and self.cleanup_on_exit:
203+
if self.process:
205204
# Should only happen on test failure
206205
# Avoid using logger, as that may have already been shutdown when
207206
# this destructor is called.

0 commit comments

Comments
 (0)