Preserve the local test runner discovery interface

This commit is contained in:
firestar5683
2026-10-24 12:28:58 -05:00
parent 4a9881ff5b
commit e5265f88b9
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "158cf8d45beb165a7fb5d2d5e2fc84c85b565fc7809078ecf6236c4acae21fee", "schema_version": 1}
{"protected_inventory_sha256": "1b3c3f82b17a5f5f2f15260e75252375b77bb33fc0fe6004a1a639ee962ea8fe", "schema_version": 1}
+3
View File
@@ -19,6 +19,9 @@ EXTRA_PYTEST_FILES = (
'openpilot/selfdrive/ui/tests/test_onboarding_textures.py',
)
# Public compatibility list also used by the local test command.
UI_PYTEST_FILES = EXTRA_PYTEST_FILES
def pytest_files(root=ROOT):
"""Select custom files containing pytest functions or plain Test classes."""
@@ -5,7 +5,7 @@ from pathlib import Path
import re
import unittest
from tools.ci.run_host_tests import pytest_files
from tools.ci.run_host_tests import UI_PYTEST_FILES, pytest_files
ROOT = Path(__file__).resolve().parents[3]
@@ -38,6 +38,7 @@ class TestFeatureTestDiscovery(unittest.TestCase):
self.assert_hosted_pytest_contract(workflow)
selected = pytest_files()
self.assertIn('openpilot/system/tests/test_sentry.py', selected)
self.assertIn('openpilot/system/tests/test_sentry.py', UI_PYTEST_FILES)
self.assertTrue(selected)
for package in ('flm', 'spot_monitor', 'sentry_mode', 'galaxy', 'ui'):
self.assertTrue(any(path.startswith(f'openpilot/starpilot/{package}/') for path in selected), package)