diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index 36f5459c2f7..349ba83f88a 100755
--- a/tests/python/cycles_render_tests.py
+++ b/tests/python/cycles_render_tests.py
@@ -104,7 +104,7 @@ def main():
output_dir = args.outdir[0]
from modules import render_report
- report = render_report.Report("Cycles Test Report", output_dir, idiff)
+ report = render_report.Report("Cycles", output_dir, idiff)
report.set_pixelated(True)
report.set_reference_dir("cycles_renders")
report.set_compare_engines('cycles', 'eevee')
diff --git a/tests/python/eevee_render_tests.py b/tests/python/eevee_render_tests.py
index b410f5fc4d8..9fb8a5f41a8 100755
--- a/tests/python/eevee_render_tests.py
+++ b/tests/python/eevee_render_tests.py
@@ -122,7 +122,7 @@ def main():
output_dir = args.outdir[0]
from modules import render_report
- report = render_report.Report("Eevee Test Report", output_dir, idiff)
+ report = render_report.Report("Eevee", output_dir, idiff)
report.set_pixelated(True)
report.set_reference_dir("eevee_renders")
report.set_compare_engines('eevee', 'cycles')
diff --git a/tests/python/modules/global_report.py b/tests/python/modules/global_report.py
index e45d159bb2d..8ed8551beb9 100755
--- a/tests/python/modules/global_report.py
+++ b/tests/python/modules/global_report.py
@@ -32,11 +32,12 @@ def _write_html(output_dir):
.failed {{ color: red; }}
.none {{ color: #999; }}
-
+
+
{title}
{combined_reports}
diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py
index 5a2baa354c7..2f99a3b6292 100755
--- a/tests/python/modules/render_report.py
+++ b/tests/python/modules/render_report.py
@@ -159,6 +159,23 @@ class Report:
filepath = os.path.join(outdir, "compare.data")
pathlib.Path(filepath).write_text(self.compare_tests)
+ def _navigation_item(self, title, href, active):
+ if active:
+ return """%s""" % title
+ else:
+ return """%s""" % (href, title)
+
+ def _navigation_html(self, comparison):
+ html = """"""
+
+ return html
+
def _write_html(self, comparison=False):
# Gather intermediate data for all tests.
if comparison:
@@ -186,17 +203,25 @@ class Report:
else:
image_rendering = 'auto'
+ # Navigation
+ menu = self._navigation_html(comparison)
+
failed = len(failed_tests) > 0
if failed:
- message = "Run BLENDER_TEST_UPDATE=1 ctest to create or update reference images for failed tests.
"
+ message = """"""
+ message += """Run this command to update reference images for failed tests, or create images for new tests:
"""
+ message += """BLENDER_TEST_UPDATE=1 ctest -R %s""" % self.title.lower()
+ message += """
"""
else:
message = ""
if comparison:
- title = "Render Test Compare"
- columns_html = "| Name | %s | %s | " % self.compare_engines
+ title = self.title + " Test Compare"
+ engine_self = self.compare_engines[0].capitalize()
+ engine_other = self.compare_engines[1].capitalize()
+ columns_html = "
|---|
| Name | %s | %s | " % (engine_self, engine_other)
else:
- title = self.title
+ title = self.title + " Test Report"
columns_html = "
|---|
| Name | New | Reference | Diff | "
html = """
@@ -226,16 +251,16 @@ class Report:
}}
table td:first-child {{ width: 256px; }}
-
+
{title}
+ {menu}
{message}
-
-
+
{columns_html}
{tests_html}
@@ -245,6 +270,7 @@ class Report:
|---|