From f4b293b84c2003defaccb1345086a35691433f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignas=20Vy=C5=A1niauskas?= Date: Wed, 23 Oct 2024 19:16:26 +0300 Subject: [PATCH] Make Github display the
 nicely

---
 testing/end-to-end/gen-report.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/testing/end-to-end/gen-report.py b/testing/end-to-end/gen-report.py
index 9f0bdec4..041e52ee 100644
--- a/testing/end-to-end/gen-report.py
+++ b/testing/end-to-end/gen-report.py
@@ -66,9 +66,17 @@ def format_markdown(full_report):
     bold_f = lambda s: f"**{s}**"
     ok_f = lambda s: f"{s} :heavy_check_mark:"
     fail_f = lambda s: f"{s} :x:"
-    log_f = lambda logs: f"""
Last logs:
-{textwrap.indent(html.escape(logs), 4 * ' ')}
-    
""" + def log_f(logs): + lines = html.escape(logs).splitlines() + lines = [l if l.strip() else "
" for l in lines] + log_str = "\n".join(lines) + return "\n" + textwrap.indent(f"""\ +
+Last logs: +
+{log_str}
+
+
""", 4 * ' ') return format_gen(full_report, bold_f, ok_f, fail_f, log_f)