From c707dd493802a33cfeda66e93e1a5da59797a32a Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Tue, 24 Nov 2026 01:18:20 -0600 Subject: [PATCH] Repair GM, Palisade and Galaxy CI fixtures --- .../opendbc/car/hyundai/tests/test_blended_sender.py | 7 ++++++- opendbc_repo/opendbc/safety/tests/test_gm_sdgm_stock.py | 1 + openpilot/starpilot/galaxy/tests/test_flm_ux_browser.mjs | 2 ++ .../starpilot/galaxy/tests/test_system_monitor_js.py | 8 ++++++-- prebuilt.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_blended_sender.py b/opendbc_repo/opendbc/car/hyundai/tests/test_blended_sender.py index 380391ca00..5e4ae4b925 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_blended_sender.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_blended_sender.py @@ -67,7 +67,10 @@ class TestBlendedSender(unittest.TestCase): command.actuators.longControlState = structs.CarControl.Actuators.LongControlState.pid command.hudControl.setSpeed = 25.0 for frame in range(32): - actuators, messages = ci.apply(command.as_reader(), 2_000_000_000 + frame * 10_000_000) + tick = 16 + frame + camera = 16 + frame // 5 if frame % 5 == 0 else False + feed(ci, tick, camera=camera) + actuators, messages = ci.apply(command.as_reader(), 1_000_000_000 + tick * 10_000_000) wanted = [] if frame % 100 == 0: wanted.append((0x730 if hdaii else 0x7D0, int(hdaii))) @@ -90,6 +93,8 @@ class TestBlendedSender(unittest.TestCase): wanted.append((0x485, 1)) self.assertEqual([(address, bus) for address, _, bus in messages], wanted) packets = {address: data for address, data, _ in messages} + if hdaii and frame % 5 == 0: + self.assertEqual(decode(ci, 0x2A4, packets[0x2A4], 'COUNTER'), camera) for address, data, _ in messages: if address not in (0x730, 0x7D0, 0x50, 0x51, 0x2A4): self.assertEqual(data[0], hyundai_checksum(data[1:8]), hex(address)) diff --git a/opendbc_repo/opendbc/safety/tests/test_gm_sdgm_stock.py b/opendbc_repo/opendbc/safety/tests/test_gm_sdgm_stock.py index d4360a9dea..1a7dce5f60 100644 --- a/opendbc_repo/opendbc/safety/tests/test_gm_sdgm_stock.py +++ b/opendbc_repo/opendbc/safety/tests/test_gm_sdgm_stock.py @@ -20,6 +20,7 @@ class TestGmSdgmStock(unittest.TestCase): return libsafety_py.make_CANPacket(msg[0], msg[2], msg[1]) def mode(self, cp): + self.safety.set_alternative_experience(0) self.assertEqual(self.safety.set_safety_hooks(CarParams.SafetyModel.gm, cp.safetyConfigs[0].safetyParam), 0) self.safety.init_tests() self.safety.set_timer(1_000_000) diff --git a/openpilot/starpilot/galaxy/tests/test_flm_ux_browser.mjs b/openpilot/starpilot/galaxy/tests/test_flm_ux_browser.mjs index 61f3da4784..7f9e9eb7f0 100644 --- a/openpilot/starpilot/galaxy/tests/test_flm_ux_browser.mjs +++ b/openpilot/starpilot/galaxy/tests/test_flm_ux_browser.mjs @@ -12,6 +12,7 @@ import { SURFACE_NAMES, FRICTION_NAMES, validTrainingResults } from '../web/js/f const root = resolve(dirname(fileURLToPath(import.meta.url)), '../web') const output = resolve('ci-results/flm-offroad.json') +const capturePassingScreens = !process.argv.includes('--failure-screenshot-only') const screenshots = [], checks = [], requests = [], errors = [], contrastResults = [], fullPageReflow = [] const targetIndex = SURFACE_NAMES.indexOf('highway_center_taper_max') const running = child => child.exitCode === null && child.signalCode === null @@ -277,6 +278,7 @@ async function layout(label) { } async function show(selector) { await execute('document.querySelector(arguments[0]).scrollIntoView({block:"center",behavior:"instant"})', selector) } async function capture(name) { + if (!capturePassingScreens && name !== 'failure') return const { data: base64 } = await command(`/session/${session}/goog/cdp/execute`, { cmd: 'Page.captureScreenshot', params: { format: 'png', captureBeyondViewport: false, optimizeForSpeed: true } }) screenshots.push({ name, png_base64: base64 }) diff --git a/openpilot/starpilot/galaxy/tests/test_system_monitor_js.py b/openpilot/starpilot/galaxy/tests/test_system_monitor_js.py index ec7098f4b5..f99e975cef 100644 --- a/openpilot/starpilot/galaxy/tests/test_system_monitor_js.py +++ b/openpilot/starpilot/galaxy/tests/test_system_monitor_js.py @@ -51,9 +51,13 @@ console.log(JSON.stringify(projectionPayload({revision: raw.revision, document: for test in TESTS: with self.subTest(test=test): - timeout = 55 if test == "test_flm_ux_browser.mjs" else 30 + browser = test == "test_flm_ux_browser.mjs" + timeout = 55 if browser else 30 + command = [node, str(Path(__file__).with_name(test))] + if browser: + command.append("--failure-screenshot-only") try: - result = subprocess.run([node, str(Path(__file__).with_name(test))], capture_output=True, text=True, timeout=timeout, check=False) + result = subprocess.run(command, capture_output=True, text=True, timeout=timeout, check=False) except subprocess.TimeoutExpired as exc: self.fail(f"System Monitor JavaScript contract timed out after {timeout} seconds: {exc}") detail = "\n".join((f"System Monitor JavaScript contract failed ({result.returncode}).", diff --git a/prebuilt.json b/prebuilt.json index 4a3ae0ac40..08a042dd2c 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "a158480f6e586193eac9a7fece9453072a056715e04c191f87edf04c81a22553", "schema_version": 1} +{"protected_inventory_sha256": "039faa7282d73968f6a428d4ca05524da23c1c86519a26383fd10e3f59f321e4", "schema_version": 1}