Fix duplicate process names (#34446)

* test

* anything actually use this?

* keep it around
pull/34445/head^2
Shane Smiskol 3 months ago committed by GitHub
parent cb6eb4f3cf
commit 4bb578ff1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      system/manager/process_config.py
  2. 5
      system/manager/test/test_manager.py

@ -82,7 +82,7 @@ procs = [
NativeProcess("ui", "selfdrive/ui", ["./ui"], always_run, watchdog_max_dt=(5 if not PC else None)), NativeProcess("ui", "selfdrive/ui", ["./ui"], always_run, watchdog_max_dt=(5 if not PC else None)),
PythonProcess("soundd", "selfdrive.ui.soundd", only_onroad), PythonProcess("soundd", "selfdrive.ui.soundd", only_onroad),
PythonProcess("locationd", "selfdrive.locationd.locationd", only_onroad), PythonProcess("locationd", "selfdrive.locationd.locationd", only_onroad),
NativeProcess("pandad", "selfdrive/pandad", ["./pandad"], always_run, enabled=False), NativeProcess("_pandad", "selfdrive/pandad", ["./pandad"], always_run, enabled=False),
PythonProcess("calibrationd", "selfdrive.locationd.calibrationd", only_onroad), PythonProcess("calibrationd", "selfdrive.locationd.calibrationd", only_onroad),
PythonProcess("torqued", "selfdrive.locationd.torqued", only_onroad), PythonProcess("torqued", "selfdrive.locationd.torqued", only_onroad),
PythonProcess("controlsd", "selfdrive.controls.controlsd", and_(not_joystick, iscar)), PythonProcess("controlsd", "selfdrive.controls.controlsd", and_(not_joystick, iscar)),

@ -7,7 +7,7 @@ from cereal import car
from openpilot.common.params import Params from openpilot.common.params import Params
import openpilot.system.manager.manager as manager import openpilot.system.manager.manager as manager
from openpilot.system.manager.process import ensure_running from openpilot.system.manager.process import ensure_running
from openpilot.system.manager.process_config import managed_processes from openpilot.system.manager.process_config import managed_processes, procs
from openpilot.system.hardware import HARDWARE from openpilot.system.hardware import HARDWARE
os.environ['FAKEUPLOAD'] = "1" os.environ['FAKEUPLOAD'] = "1"
@ -31,6 +31,9 @@ class TestManager:
os.environ['PREPAREONLY'] = '1' os.environ['PREPAREONLY'] = '1'
manager.main() manager.main()
def test_duplicate_procs(self):
assert len(procs) == len(managed_processes), "Duplicate process names"
def test_blacklisted_procs(self): def test_blacklisted_procs(self):
# TODO: ensure there are blacklisted procs until we have a dedicated test # TODO: ensure there are blacklisted procs until we have a dedicated test
assert len(BLACKLIST_PROCS), "No blacklisted procs to test not_run" assert len(BLACKLIST_PROCS), "No blacklisted procs to test not_run"

Loading…
Cancel
Save