Align regression and settings coverage with current AOL contracts

This commit is contained in:
firestar5683
2026-10-30 01:05:49 -05:00
parent e00fb66bc8
commit 7e00ee80c4
7 changed files with 15 additions and 5 deletions
@@ -215,7 +215,8 @@ def test_declared_proofs_with_controlled_schedule(schedule):
expected = schedule in ('no_delay', 'expired_at_entry', 'cross_before_guard')
assert bool(command.latActive) == expected and not command.longActive
assert native_checks == [schedule != 'expired_invalid_native']
assert len(updates) == int(schedule != 'no_delay')
expected_updates = 2 if schedule in ('cross_no_pending', 'expired_empty') else int(schedule != 'no_delay')
assert updates == [guard] * expected_updates
assert axis_checks[0]['accepted'] == (schedule not in ('cross_no_pending', 'expired_empty'))
diagnostic = controls.aol_transition_diagnostic
assert (diagnostic.pending is None) == expected
@@ -8,6 +8,7 @@ import pytest
from opendbc.can import CANParser
from opendbc.car import Bus, gen_empty_fingerprint, structs
from opendbc.car.subaru.values import CAR, DBC
from opendbc.car.subaru.stock_aol import IMPREZA_MAIN_AOL
from opendbc.car.subaru.fingerprints import FW_VERSIONS
from opendbc.safety.tests.libsafety import libsafety_py
from openpilot.cereal import messaging
@@ -71,7 +72,8 @@ def test_sng_actual_stock_callers(candidate, software, aol, subaru_native_pair,
safety = libsafety_py.libsafety
assert cp.pcmCruise and not cp.openpilotLongitudinalControl and not cp.alphaLongitudinalAvailable
assert cp.alternativeExperience == (32 if aol else 0) and not cp.dashcamOnly
assert cp.safetyConfigs[0].safetyParam == (520 if software else 8) and cp.autoResumeSng
expected_word = (520 if software else 8) | (IMPREZA_MAIN_AOL if aol and candidate == CAR.SUBARU_IMPREZA_2020 else 0)
assert cp.safetyConfigs[0].safetyParam == expected_word and cp.autoResumeSng
sd, controls = SelfdriveD(CP=cp), Controls()
stream = CompleteCan(ci)
safety.init_tests()
@@ -8,6 +8,7 @@ import pytest
from opendbc.can import CANParser
from opendbc.car import Bus, gen_empty_fingerprint, structs
from opendbc.car.subaru.values import CAR, DBC
from opendbc.car.subaru.stock_aol import IMPREZA_MAIN_AOL
from opendbc.car.subaru.fingerprints import FW_VERSIONS
from opendbc.safety.tests.libsafety import libsafety_py
from openpilot.cereal import messaging
@@ -63,7 +64,7 @@ def test_software_cruise_actual_stock_callers(aol, subaru_native_pair, tmp_path)
safety = libsafety_py.libsafety
assert cp.pcmCruise and not cp.openpilotLongitudinalControl and not cp.alphaLongitudinalAvailable
assert cp.alternativeExperience == (32 if aol else 0) and not cp.dashcamOnly
assert cp.safetyConfigs[0].safetyParam == 512
assert cp.safetyConfigs[0].safetyParam == (512 | (IMPREZA_MAIN_AOL if aol else 0))
sd, controls = SelfdriveD(CP=cp), Controls()
stream = CompleteCan(ci)
safety.init_tests()
@@ -54,7 +54,10 @@ def test_factory_exposes_only_discovered_four_byte_buttons(tmp_path, identity, s
rows = {r.key: r for r in feature(Params(str(tmp_path)), cp).rows()}
assert {'wheel:LKASButtonControl', 'wheel:DistanceButtonControl', 'wheel:LongDistanceButtonControl',
'wheel:VeryLongDistanceButtonControl'} <= rows.keys()
assert not {'wheel:MainCruiseButtonControl', 'wheel:CancelButtonControl'} & rows.keys()
assert 'wheel:CancelButtonControl' not in rows
main = rows['wheel:MainCruiseButtonControl']
assert main.value == 'Factory cruise / AOL' and not main.available and not main.choices
assert not feature(Params(str(tmp_path)), cp).choices('MainCruiseButtonControl')
if not stock:
assert 'Cycle personality' in rows['wheel:DistanceButtonControl'].choices
@@ -6,6 +6,7 @@ This presentation catalog supplies the purpose before any genuine prerequisite.
from openpilot.starpilot.ui.long_profile_feature import CATEGORY_HELP, VALUE_HELP
DESCRIPTIONS = {
'ReduceMotion': 'Reduces interface animations for a steadier display.',
'IsMetric': 'On displays speed and distance in kilometers; Off uses miles. Saved speed-limit offsets keep their physical values.',
'IsRhdDetected': 'Sets the initial steering-wheel side used by driver monitoring. Applies next drive; automatic side detection continues.',
'FordPrefSteerAngleCurvature': 'Uses steering pinion angle instead of yaw rate to estimate Ford steering curvature. Applies at the next vehicle startup.',
@@ -67,6 +67,7 @@
"PromptDistractedVolume",
"PromptVolume",
"RadarRecoveryAlert",
"ReduceMotion",
"RefuseVolume",
"RelaxedFollow",
"RelaxedFollowHigh",
@@ -77,6 +78,7 @@
"RelaxedJerkSpeedDecrease",
"RemoteStartBootsComma",
"ReverseCruise",
"SLCAdvanceSeconds",
"SLCConfirmation",
"SLCPriority1",
"SLCPriority2",
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "45aa2de8b9c8d86f22f382b25ba847afff179057d13e9414e4900513a97c6705", "schema_version": 1}
{"protected_inventory_sha256": "f7e90cdc7655a052945d8d193e6e5548b57d32469f18feec72e9e25862ebd8fc", "schema_version": 1}