Tests: make reports summary HTML work with relative links
So that downloading the test results from the buildbot has working links.
This commit is contained in:
parent
b0a4dd56aa
commit
3f0f26ee8a
@ -63,12 +63,14 @@ def add(output_dir, category, name, filepath, failed=None):
|
|||||||
else:
|
else:
|
||||||
status = "ok"
|
status = "ok"
|
||||||
|
|
||||||
|
relpath = os.path.relpath(filepath, output_dir)
|
||||||
|
|
||||||
html = """
|
html = """
|
||||||
<span class="{status}">⬤</span>
|
<span class="{status}">⬤</span>
|
||||||
<a href="file://{filepath}">{name}</a><br/>
|
<a href="{relpath}">{name}</a><br/>
|
||||||
""" . format(status=status,
|
""" . format(status=status,
|
||||||
name=name,
|
name=name,
|
||||||
filepath=filepath)
|
relpath=relpath)
|
||||||
|
|
||||||
dirpath = os.path.join(output_dir, "report", category)
|
dirpath = os.path.join(output_dir, "report", category)
|
||||||
os.makedirs(dirpath, exist_ok=True)
|
os.makedirs(dirpath, exist_ok=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user