diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 3b0cc29963..1210430af2 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -246,6 +246,7 @@ jobs: $UNIT_TEST selfdrive/locationd && \ $UNIT_TEST selfdrive/athena && \ $UNIT_TEST selfdrive/thermald && \ + $UNIT_TEST selfdrive/hardware/tici && \ $UNIT_TEST tools/lib/tests && \ ./selfdrive/boardd/tests/test_boardd_usbprotocol && \ ./selfdrive/common/tests/test_util && \ diff --git a/selfdrive/hardware/tici/test_agnos_updater.py b/selfdrive/hardware/tici/test_agnos_updater.py new file mode 100755 index 0000000000..9f188b83dc --- /dev/null +++ b/selfdrive/hardware/tici/test_agnos_updater.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import json +import os +import unittest +import requests + +AGNOS_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__))) +MANIFEST = os.path.join(AGNOS_DIR, "agnos.json") + + +class TestAgnosUpdater(unittest.TestCase): + + def test_manifest(self): + with open(MANIFEST) as f: + m = json.load(f) + + for img in m: + r = requests.head(img['url']) + r.raise_for_status() + self.assertEqual(r.headers['Content-Type'], "application/x-xz") + if not img['sparse']: + assert img['hash'] == img['hash_raw'] + + +if __name__ == "__main__": + unittest.main()