From 63c80e7aa9e9adf3a36b36fdad35114817b46c22 Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Wed, 4 Sep 2019 12:10:08 -0500 Subject: [PATCH] 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. --- tests/fixtures.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fixtures.py b/tests/fixtures.py index 5708d8699..37ad7ed2d 100644 --- a/tests/fixtures.py +++ b/tests/fixtures.py @@ -127,10 +127,6 @@ def node_factory(request, directory, test_name, bitcoind, executor): err_count += printCrashLog(node) 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: err_count += checkReconnect(node) 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: 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: request.node.has_errors = True raise Exception("At least one lightning exited with unexpected non-zero return code")