]> git.ipfire.org Git - thirdparty/bind9.git/commit
Unify the WatchLog.wait_for_line/s() API
authorNicki Křížek <nicki@isc.org>
Mon, 16 Jun 2025 16:39:56 +0000 (18:39 +0200)
committerNicki Křížek <nicki@isc.org>
Fri, 18 Jul 2025 09:32:41 +0000 (11:32 +0200)
commit5840908ead3a1f1775bda6690c820bbcbfd9d849
tree71f6de40ce95d227bb534d7ff204ba22b0b00d1c
parentf2679bff194e1bb00b3b0f25264f056e5ba60af5
Unify the WatchLog.wait_for_line/s() API

Rather than using two distinct functions for matching either one pattern
(wait_for_line()), or any of multiple patterns (wait_for_lines()), use a
single function that handles both in the same way.

Extend the wait_for_line() API:
1. To allow for usage of one or more FlexPatterns, i.e. either plain
   strings to be matched verbatim, or regular expressions. Both can be
   used interchangeably to provide the caller to write simple and
   readable test code, while allowing for increased complexity to allow
   special cases.
2. Always return the regex match, which allows the caller to identify
   which line was matched, as well as to extract any additional
   information, such as individual regex groups.
bin/tests/system/isctest/log/watchlog.py