pexpect: Show last 10 lines on failure

This was sometimes slightly annoying in porting.

5 is enough most of the time, 10 should be enough basically always,
without being too annoying if you don't need it.
This commit is contained in:
Fabian Homborg 2020-06-13 19:51:37 +02:00
parent aa7316b6c6
commit cfa2927610

View file

@ -260,10 +260,10 @@ class SpawnedProc(object):
print("")
# Show the last 5 messages.
print("Last 5 messages:")
# Show the last 10 messages.
print("Last 10 messages:")
delta = None
for m in self.messages[-5:]:
for m in self.messages[-10:]:
etext = escape(m.text)
timestamp = m.when * 1000.0
# Use relative timestamps and add a sign.