mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-28 18:33:45 +08:00
blankity blankity blank
This commit is contained in:
@@ -39,6 +39,7 @@ def python_ui_process_start_method(uses_python_ui: bool, is_pc: bool = PC) -> st
|
||||
|
||||
PYTHON_UI = python_ui_enabled(device_type)
|
||||
PYTHON_UI_PROCESS_START_METHOD = python_ui_process_start_method(PYTHON_UI)
|
||||
THE_GALAXY_PROCESS_START_METHOD = "fork" if PC else "subprocess"
|
||||
|
||||
from openpilot.system.manager.process import PythonProcess, NativeProcess, DaemonProcess
|
||||
|
||||
@@ -169,7 +170,13 @@ procs = [
|
||||
|
||||
# StarPilot variables
|
||||
procs += [
|
||||
PythonProcess("the_galaxy", "starpilot.system.the_galaxy.the_galaxy", always_run, nice=19),
|
||||
PythonProcess(
|
||||
"the_galaxy",
|
||||
"starpilot.system.the_galaxy.the_galaxy",
|
||||
always_run,
|
||||
nice=19,
|
||||
start_method=THE_GALAXY_PROCESS_START_METHOD,
|
||||
),
|
||||
PythonProcess("galaxy", "starpilot.system.galaxy.galaxy", always_run, nice=19),
|
||||
]
|
||||
|
||||
|
||||
@@ -125,12 +125,13 @@ class TestManager:
|
||||
def test_python_ui_subprocess_is_scoped_to_ui(self):
|
||||
ui_proc = managed_processes["ui"]
|
||||
uses_python_ui = python_ui_enabled(HARDWARE.get_device_type())
|
||||
subprocess_scoped_procs = {"the_galaxy"}
|
||||
|
||||
assert isinstance(ui_proc, PythonProcess) == uses_python_ui
|
||||
if uses_python_ui:
|
||||
assert ui_proc.start_method == python_ui_process_start_method(uses_python_ui)
|
||||
for proc in procs:
|
||||
if isinstance(proc, PythonProcess) and proc.name != "ui":
|
||||
if isinstance(proc, PythonProcess) and proc.name not in subprocess_scoped_procs | {"ui"}:
|
||||
assert proc.start_method is None
|
||||
|
||||
def test_python_ui_env_override(self, monkeypatch):
|
||||
|
||||
Reference in New Issue
Block a user