Repair Ford BluePilot startup fixtures and native test loader identity

This commit is contained in:
firestar5683
2026-10-31 20:44:19 -05:00
parent a7f4ba8254
commit feb1f442c2
3 changed files with 10 additions and 4 deletions
@@ -5,7 +5,9 @@ import pytest
from opendbc.car import gen_empty_fingerprint, structs
from opendbc.car.ford.interface import CarInterface
from opendbc.car.ford.values import CAR
from opendbc.car.ford.values import CAR, FordFlags
from opendbc.bluepilot_lateral.core.values_ext import FordSafetyFlagsSP
from opendbc.bluepilot_lateral.hosts.starpilot.safety_param import BP_SAFETY_PARAM_SHIFT
PROFILES = (
@@ -76,6 +78,8 @@ def run_startup(identity, base_word, alpha, release, topology, monkeypatch):
initial_word = base_word | int(expected_long)
expected_word = initial_word | (256 if topology == "manual" else 0)
initial = CarInterface.get_params(identity, fingerprint, [], expected_long, release, False)
if not initial.flags & FordFlags.LKA_STEERING:
expected_word |= FordSafetyFlagsSP.BP_LATERAL << BP_SAFETY_PARAM_SHIFT
initial.carVin = "0" * 17
initial.carFw = []
admitted = True
@@ -88,8 +92,7 @@ def run_startup(identity, base_word, alpha, release, topology, monkeypatch):
with OpenpilotPrefix():
saved = Params()
for key, value in (("OpenpilotEnabledToggle", True), ("AlwaysOnLateral", True),
("AlphaLongitudinalEnabled", alpha), ("IsReleaseBranch", release),
("FordHumanTurnDetection", False)):
("AlphaLongitudinalEnabled", alpha), ("IsReleaseBranch", release)):
saved.put_bool(key, value, block=True)
observed = (identity, fingerprint, initial.carVin, [], initial.fingerprintSource, True)
subscriber = messaging.sub_sock("carParams", timeout=100, conflate=True)
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "cd8c615958ada909b930d7ca76d9e24103f34e308a7e716591641759eea12403", "schema_version": 1}
{"protected_inventory_sha256": "ec942078f3cfc87d5683b73d47e4c45adea7152ea1ddfa76c49bd4668cbedcd6", "schema_version": 1}
+3
View File
@@ -690,6 +690,9 @@ def native_provenance():
def build_safety_library(release, output):
from opendbc.car.structs import CarParams
from opendbc.safety.tests.libsafety import libsafety_py
alias = "opendbc_repo.opendbc.safety.tests.libsafety.libsafety_py"
if sys.modules.setdefault(alias, libsafety_py) is not libsafety_py:
raise RuntimeError("Vehicle tests imported multiple native safety loaders")
commands = []
check_call = subprocess.check_call