From cb51aee21cb06488a410fe0a380504fd7615d4ad Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 11 May 2023 08:26:37 +0200 Subject: [PATCH] test-client: increase context in pexecpt failure for debugging When a pexpect check fails, we want to see the full content of the buffer, so we can better see where it went wrong. Increase the context that is printed in the error message. --- src/tests/client/test-client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/client/test-client.py b/src/tests/client/test-client.py index b6f7cf00a..e33317b1a 100755 --- a/src/tests/client/test-client.py +++ b/src/tests/client/test-client.py @@ -1009,6 +1009,8 @@ class TestNmClient(unittest.TestCase): pexp = pexpect.spawn(argv[0], argv[1:], timeout=10, env=env) + pexp.str_last_chars = 100000 + typ = collections.namedtuple("CallPexpect", ["pexp", "valgrind_log"]) return typ(pexp, valgrind_log)