mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Fix regression tests
Taught bitcoind to close the HTTP connection after it gets a 'stop' command, to make it easier for the regression tests to cleanly stop. Move bitcoinrpc files to correct location. Tidied up the python-based regression tests.
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
d3c3210fa3
commit
d138598f63
@@ -118,6 +118,7 @@ def main():
|
||||
check_json_precision()
|
||||
|
||||
success = False
|
||||
nodes = []
|
||||
try:
|
||||
print("Initializing test directory "+options.tmpdir)
|
||||
if not os.path.isdir(options.tmpdir):
|
||||
@@ -127,6 +128,7 @@ def main():
|
||||
nodes = start_nodes(2, options.tmpdir)
|
||||
connect_nodes(nodes[1], 0)
|
||||
sync_blocks(nodes)
|
||||
|
||||
run_test(nodes)
|
||||
|
||||
success = True
|
||||
@@ -135,12 +137,12 @@ def main():
|
||||
print("Assertion failed: "+e.message)
|
||||
except Exception as e:
|
||||
print("Unexpected exception caught during testing: "+str(e))
|
||||
stack = traceback.extract_tb(sys.exc_info()[2])
|
||||
print(stack[-1])
|
||||
traceback.print_tb(sys.exc_info()[2])
|
||||
|
||||
if not options.nocleanup:
|
||||
print("Cleaning up")
|
||||
stop_nodes()
|
||||
stop_nodes(nodes)
|
||||
wait_bitcoinds()
|
||||
shutil.rmtree(options.tmpdir)
|
||||
|
||||
if success:
|
||||
|
||||
Reference in New Issue
Block a user