From: Kienan Stewart Date: Wed, 13 Nov 2024 15:58:26 +0000 (-0500) Subject: Tests: Support multi-line diagnostic messages X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f4e5435933bb9fe2ddd48a2b06ed605f0dee6061;p=lttng-tools.git Tests: Support multi-line diagnostic messages Change-Id: Icf16a39814b70ae9a9548add78135118477254ff Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- 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)