From f4e5435933bb9fe2ddd48a2b06ed605f0dee6061 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 13 Nov 2024 10:58:26 -0500 Subject: [PATCH] Tests: Support multi-line diagnostic messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Icf16a39814b70ae9a9548add78135118477254ff Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- tests/utils/lttngtest/tap_generator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/utils/lttngtest/tap_generator.py b/tests/utils/lttngtest/tap_generator.py index c9bd8edad..69cbeb47b 100644 --- a/tests/utils/lttngtest/tap_generator.py +++ b/tests/utils/lttngtest/tap_generator.py @@ -200,4 +200,5 @@ class TapGenerator: def diagnostic(self, msg): # type: (str) -> None - print("# {msg}".format(msg=msg), file=sys.stderr, flush=True) + for line in str(msg).split("\n"): + print("# {msg}".format(msg=line), file=sys.stderr, flush=True) -- 2.39.5