mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
pytest: Do not re-print logs if we failed to find a log entry
CI always runs with TEST_DEBUG=1 which prints logs anyway, and testing locally should also be done this way, combined with pytest which captures the logs. No need to duplicate the functionality of pytest. Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
d0da8a1035
commit
90527498bc
@@ -121,7 +121,6 @@ class TailableProc(object):
|
||||
starting from last of the previous waited-for log entries (if any). We
|
||||
fail if the timeout is exceeded or if the underlying process
|
||||
exits before all the `regexs` were found.
|
||||
|
||||
"""
|
||||
logging.debug("Waiting for {} in the logs".format(regexs))
|
||||
exs = [re.compile(r) for r in regexs]
|
||||
@@ -131,9 +130,6 @@ class TailableProc(object):
|
||||
while True:
|
||||
if time.time() > start_time + timeout:
|
||||
print("Can't find {} in logs".format(exs))
|
||||
with self.logs_cond:
|
||||
for i in range(initial_pos, len(self.logs)):
|
||||
print(" " + self.logs[i])
|
||||
for r in exs:
|
||||
if self.is_in_log(r):
|
||||
print("({} was previously in logs!)".format(r))
|
||||
|
||||
Reference in New Issue
Block a user