From 3f0f26ee8ae88ba3c91f85e5f7eeab41e6cc071e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 26 Jan 2024 16:20:57 +0100 Subject: [PATCH] Tests: make reports summary HTML work with relative links So that downloading the test results from the buildbot has working links. --- tests/python/modules/global_report.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/python/modules/global_report.py b/tests/python/modules/global_report.py index d750b2ecd4d..80bc758ccba 100755 --- a/tests/python/modules/global_report.py +++ b/tests/python/modules/global_report.py @@ -63,12 +63,14 @@ def add(output_dir, category, name, filepath, failed=None): else: status = "ok" + relpath = os.path.relpath(filepath, output_dir) + html = """ - {name}
+ {name}
""" . format(status=status, name=name, - filepath=filepath) + relpath=relpath) dirpath = os.path.join(output_dir, "report", category) os.makedirs(dirpath, exist_ok=True)