diff --git a/openpilot/system/loggerd/loggerd b/openpilot/system/loggerd/loggerd index 4bc05fff42..31cd6e6ce2 100755 Binary files a/openpilot/system/loggerd/loggerd and b/openpilot/system/loggerd/loggerd differ diff --git a/openpilot/tools/replay/replay b/openpilot/tools/replay/replay index 63312b0d31..7df0b9c1de 100755 Binary files a/openpilot/tools/replay/replay and b/openpilot/tools/replay/replay differ diff --git a/prebuilt.json b/prebuilt.json index af67c998e4..9da5684df0 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "25f884a9a6495f49cc4c52130811797f029a4f4ff31dd43626d0dc0c7fdae940", "schema_version": 1} +{"protected_inventory_sha256": "bd3e07f30455b24cea8521ad2fc9ed98041abdabc8b3a82e01d471d9e56e80a9", "schema_version": 1} diff --git a/tools/laptop_device_build/tests/test_runtime_dependencies.py b/tools/laptop_device_build/tests/test_runtime_dependencies.py index a0d22dcc01..de33805441 100644 --- a/tools/laptop_device_build/tests/test_runtime_dependencies.py +++ b/tools/laptop_device_build/tests/test_runtime_dependencies.py @@ -1,6 +1,7 @@ """Catch device binaries linked to build-environment Cap'n Proto/KJ libraries.""" from pathlib import Path +import ast import subprocess import sys import unittest @@ -22,3 +23,26 @@ class DeviceRuntimeDependenciesTest(unittest.TestCase): dynamic = subprocess.check_output(['readelf', '--dynamic', '--wide', str(ROOT / binary)], text=True) self.assertNotRegex(dynamic, r'\(NEEDED\).*\[.*lib(?:capnp|kj)', f"{binary}: link Cap'n Proto/KJ statically for AGNOS") + + +class LiveSteeringServiceInventoryTest(unittest.TestCase): + def test_live_steering_tracking_is_registered_in_shipped_native_consumers(self): + service = 'starpilotSteeringTracking' + tree = ast.parse((ROOT / 'openpilot/cereal/services.py').read_text()) + declarations = [node.value for node in tree.body if isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) and node.target.id == '_services'] + self.assertEqual(len(declarations), 1) + table = declarations[0] + if not isinstance(table, ast.Dict): + self.fail('Service registry must be a dictionary') + declared = [value for key, value in zip(table.keys, table.values, strict=True) + if isinstance(key, ast.Constant) and key.value == service] + self.assertEqual(len(declared), 1) + definition = declared[0] + if not isinstance(definition, ast.Tuple): + self.fail('Service declaration must be a tuple') + self.assertIs(ast.literal_eval(definition.elts[0]), True) + for binary in ('openpilot/system/loggerd/loggerd', 'openpilot/tools/replay/replay'): + with self.subTest(binary=binary): + self.assertIn(service.encode(), (ROOT / binary).read_bytes(), + f'{binary}: rebuild after changing the native service registry')