mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
tests/test_lightningd.py: incorporate everything from old test-basic shell test.
This moves all the non-legacy blackbox testing into python. Before: real 10m18.385s After: real 9m54.877s Note that this doesn't valgrind the subdaemons: that patch seems to cause some issues in the python framework which I am still chasing. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
be3b5f11e8
commit
f61da7eb64
@@ -74,7 +74,19 @@ class TailableProc(object):
|
||||
logging.debug("%s: %s", self.prefix, line.decode().rstrip())
|
||||
self.logs_cond.notifyAll()
|
||||
self.running = False
|
||||
|
||||
|
||||
def is_in_log(self, regex):
|
||||
"""Look for `regex` in the logs."""
|
||||
|
||||
ex = re.compile(regex)
|
||||
for l in self.logs:
|
||||
if ex.search(l):
|
||||
logging.debug("Found '%s' in logs", regex)
|
||||
return True
|
||||
|
||||
logging.debug("Did not find '%s' in logs", regex)
|
||||
return False
|
||||
|
||||
def wait_for_log(self, regex, offset=1000, timeout=60):
|
||||
"""Look for `regex` in the logs.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user