Fix HD benchmark reporting and record renderer A/B results (#147)
build / mod (push) Failing after 17s
build / mod (push) Failing after 17s
Resolve benchmark input paths before switching to the disposable game home and report startup failures without a missing screenshot traceback. Capture the executable hash and keep report environment metadata limited to benchmark settings. Record the earlier light and smoke measurements and the repeated idle A/B runs. Verified with 18 Python benchmark tests, 36 Horizon HD tests, the Metal TAAU smoke test, and the real idle launch and error paths.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Tests of tools/hd_bench.py's comparison (#82): `python3 -m unittest tools/test_hd_bench.py`."""
|
||||
import argparse
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
@@ -8,6 +9,21 @@ sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
import hd_bench as hb # noqa: E402
|
||||
|
||||
|
||||
class Report(unittest.TestCase):
|
||||
def test_launch_error_without_a_screenshot_is_reported(self):
|
||||
entry = {"name": "scene", "world": "test", "time": 6000, "note": "test",
|
||||
"error": "launch failed", "fail": ["launch failed"]}
|
||||
meta = {"game": "client", "game_sha256": "?" * 64, "resources": "resources",
|
||||
"freeze": True, "stills": 2, "still_gap": 0.5, "warmup_secs": 1,
|
||||
"motion_level": hb.MOTION_LEVEL, "flicker_level": hb.FLICKER_LEVEL}
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
out = Path(directory)
|
||||
hb.write_report(out, [entry], hb.parse_args([]), {}, None, None, meta)
|
||||
report = (out / "report.md").read_text()
|
||||
self.assertIn("FAIL: launch failed", report)
|
||||
self.assertNotIn("![scene]", report)
|
||||
|
||||
|
||||
def frame(w, h, v):
|
||||
return bytes([v]) * (3 * w * h)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user