diff --git a/selfdrive/ui/tests/.gitignore b/selfdrive/ui/tests/.gitignore index 39e2f8970..74ab2675d 100644 --- a/selfdrive/ui/tests/.gitignore +++ b/selfdrive/ui/tests/.gitignore @@ -1,7 +1,2 @@ test test_translations -test_ui/report_1 - -diff/**/*.mp4 -diff/**/*.html -diff/.coverage diff --git a/selfdrive/ui/tests/diff/.gitignore b/selfdrive/ui/tests/diff/.gitignore new file mode 100644 index 000000000..e21a8d896 --- /dev/null +++ b/selfdrive/ui/tests/diff/.gitignore @@ -0,0 +1,2 @@ +report +.coverage diff --git a/selfdrive/ui/tests/diff/diff.py b/selfdrive/ui/tests/diff/diff.py index 42efa381b..974edb42a 100755 --- a/selfdrive/ui/tests/diff/diff.py +++ b/selfdrive/ui/tests/diff/diff.py @@ -8,6 +8,7 @@ from pathlib import Path from openpilot.common.basedir import BASEDIR DIFF_OUT_DIR = Path(BASEDIR) / "selfdrive" / "ui" / "tests" / "diff" / "report" +HTML_TEMPLATE_PATH = Path(__file__).with_name("diff_template.html") def extract_framehashes(video_path): @@ -71,64 +72,17 @@ def generate_html_report(videos: tuple[str, str], basedir: str, different_frames + (f" Video {'2' if frame_delta > 0 else '1'} is longer by {abs(frame_delta)} frames." if frame_delta != 0 else "") ) - def render_video_cell(video_id: str, title: str, path: str, is_diff=False): - return f""" -
{title}
- -Results: {result_text}
-""" return html diff --git a/selfdrive/ui/tests/diff/diff_template.html b/selfdrive/ui/tests/diff/diff_template.html new file mode 100644 index 000000000..3f1de1051 --- /dev/null +++ b/selfdrive/ui/tests/diff/diff_template.html @@ -0,0 +1,80 @@ + + + + + +Results: $RESULT_TEXT
+ + +