dragonpilot beta3

date: 2023-10-09T10:55:55
commit: 91b6e3aecd7170f24bccacb10c515ec281c30295
This commit is contained in:
dragonpilot
2023-10-09 10:54:45 -07:00
parent a9ba3193e2
commit cfe0ae9b8a
518 changed files with 159749 additions and 17401 deletions
+12 -5
View File
@@ -5,17 +5,18 @@ import time
import unittest
from cereal import car
from common.params import Params
import selfdrive.manager.manager as manager
from selfdrive.manager.process import ensure_running
from selfdrive.manager.process_config import managed_processes
from system.hardware import HARDWARE
from openpilot.common.params import Params
import openpilot.selfdrive.manager.manager as manager
from openpilot.selfdrive.manager.process import ensure_running
from openpilot.selfdrive.manager.process_config import managed_processes
from openpilot.system.hardware import HARDWARE
os.environ['FAKEUPLOAD'] = "1"
MAX_STARTUP_TIME = 3
BLACKLIST_PROCS = ['manage_athenad', 'pandad', 'pigeond']
class TestManager(unittest.TestCase):
def setUp(self):
os.environ['PASSIVE'] = '0'
@@ -32,6 +33,10 @@ class TestManager(unittest.TestCase):
os.environ['PREPAREONLY'] = '1'
manager.main()
def test_blacklisted_procs(self):
# TODO: ensure there are blacklisted procs until we have a dedicated test
self.assertTrue(len(BLACKLIST_PROCS), "No blacklisted procs to test not_run")
def test_startup_time(self):
for _ in range(10):
start = time.monotonic()
@@ -59,6 +64,8 @@ class TestManager(unittest.TestCase):
self.assertTrue(state.running, f"{p.name} not running")
exit_code = p.stop(retry=False)
self.assertNotIn(p.name, BLACKLIST_PROCS, f"{p.name} was started")
# TODO: mapsd should exit cleanly
if p.name == "mapsd":
continue