mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-28 00:53:45 +08:00
Preserve the local test runner discovery interface
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
{"protected_inventory_sha256": "158cf8d45beb165a7fb5d2d5e2fc84c85b565fc7809078ecf6236c4acae21fee", "schema_version": 1}
|
||||
{"protected_inventory_sha256": "1b3c3f82b17a5f5f2f15260e75252375b77bb33fc0fe6004a1a639ee962ea8fe", "schema_version": 1}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user