pyln-testing: catch special CI string so we can have non-BROKEN CI warnings.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-09-02 16:03:03 +09:30
parent 40a44d9aab
commit 5a52c6bd63
2 changed files with 4 additions and 1 deletions

View File

@@ -20,6 +20,9 @@ enum log_level {
};
#define LOG_LEVEL_MAX LOG_BROKEN
/* Things that can happen in real life, but we don't expect under CI. */
#define CI_UNEXPECTED "That's weird: "
const char *log_level_name(enum log_level level);
bool log_level_parse(const char *levelstr, size_t len,
enum log_level *level);

View File

@@ -612,7 +612,7 @@ def checkBadGossip(node):
def checkBroken(node):
node.daemon.logs_catchup()
broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l]
broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l or "That's weird: " in l]
if node.broken_log:
ex = re.compile(node.broken_log)
broken_lines = [l for l in broken_lines if not ex.search(l)]