Browse Source

test-fixtures: move 'broken' check to after memleak

Memleaks appear in the logs as 'broken', so the broken log
check captures them as well. This moves broken to after memleak
so we get more informative error messages.
pull/2803/head
lisa neigut 6 years ago
committed by Rusty Russell
parent
commit
63c80e7aa9
  1. 8
      tests/fixtures.py

8
tests/fixtures.py

@ -127,10 +127,6 @@ def node_factory(request, directory, test_name, bitcoind, executor):
err_count += printCrashLog(node) err_count += printCrashLog(node)
check_errors(request, err_count, "{} nodes had crash.log files") check_errors(request, err_count, "{} nodes had crash.log files")
for node in [n for n in nf.nodes if not n.allow_broken_log]:
err_count += checkBroken(node)
check_errors(request, err_count, "{} nodes had BROKEN messages")
for node in nf.nodes: for node in nf.nodes:
err_count += checkReconnect(node) err_count += checkReconnect(node)
check_errors(request, err_count, "{} nodes had unexpected reconnections") check_errors(request, err_count, "{} nodes had unexpected reconnections")
@ -153,6 +149,10 @@ def node_factory(request, directory, test_name, bitcoind, executor):
if err_count: if err_count:
raise ValueError("{} nodes had memleak messages".format(err_count)) raise ValueError("{} nodes had memleak messages".format(err_count))
for node in [n for n in nf.nodes if not n.allow_broken_log]:
err_count += checkBroken(node)
check_errors(request, err_count, "{} nodes had BROKEN messages")
if not ok: if not ok:
request.node.has_errors = True request.node.has_errors = True
raise Exception("At least one lightning exited with unexpected non-zero return code") raise Exception("At least one lightning exited with unexpected non-zero return code")

Loading…
Cancel
Save