From f5c752abfd4286c81577de62852181c88ba29004 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 2 Jun 2023 19:32:45 -0700 Subject: [PATCH] test every fuzzy ecu fw returns one platform code --- selfdrive/car/tests/test_fw_fingerprint.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index bd4a3e40d1..f5e88009df 100755 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -107,6 +107,11 @@ class TestFwFingerprint(unittest.TestCase): self.assertEqual(len(config.fuzzy_ecus), 0, "Cannot specify fuzzy ECUs without full config") else: self.assertGreater(len(config.fuzzy_ecus), 0, "Need to specify fuzzy ECUs") + for platform, fw_by_addr in VERSIONS[brand].items(): + for addr, fws in fw_by_addr.items(): + if addr[0] in config.fuzzy_ecus: + for f in fws: + self.assertEqual(1, len(config.fuzzy_get_platform_codes([f]))) def test_fw_request_ecu_whitelist(self): for brand, config in FW_QUERY_CONFIGS.items():