From cfa2927610c7085a865aa2cbad809af1df59763b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 13 Jun 2020 19:51:37 +0200 Subject: [PATCH] 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. --- build_tools/pexpect_helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_tools/pexpect_helper.py b/build_tools/pexpect_helper.py index 982c6fb9b..9be52772b 100644 --- a/build_tools/pexpect_helper.py +++ b/build_tools/pexpect_helper.py @@ -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.