test_onroad covers this

This commit is contained in:
Adeeb Shihadeh
2026-05-10 18:27:36 -07:00
parent 2691aa8e39
commit bbe5b38643
2 changed files with 0 additions and 52 deletions

1
Jenkinsfile vendored
View File

@@ -247,7 +247,6 @@ node {
step("test pandad loopback", "pytest selfdrive/pandad/tests/test_pandad_loopback.py"),
step("test pandad spi", "pytest selfdrive/pandad/tests/test_pandad_spi.py"),
step("test amp", "pytest system/hardware/tici/tests/test_amplifier.py"),
step("test qcomgpsd", "pytest system/qcomgpsd/tests/test_qcomgpsd.py", [diffPaths: ["system/qcomgpsd/"]]),
])
},

View File

@@ -1,51 +0,0 @@
import os
import pytest
import time
import cereal.messaging as messaging
from openpilot.system.qcomgpsd.qcomgpsd import at_cmd, wait_for_modem
from openpilot.system.manager.process_config import managed_processes
@pytest.mark.tici
class TestQcomgpsd:
@classmethod
def setup_class(cls):
os.system("sudo systemctl restart ModemManager lte")
wait_for_modem()
@classmethod
def teardown_class(cls):
managed_processes['qcomgpsd'].stop()
os.system("sudo systemctl restart ModemManager lte")
def setup_method(self):
self.sm = messaging.SubMaster(['qcomGnss', 'gpsLocation'])
def teardown_method(self):
managed_processes['qcomgpsd'].stop()
def _wait_for_output(self, t):
dt = 0.1
for _ in range(t*int(1/dt)):
self.sm.update(0)
if self.sm.updated['qcomGnss']:
break
time.sleep(dt)
return self.sm.updated['qcomGnss']
def test_startup_time(self):
managed_processes['qcomgpsd'].start()
assert self._wait_for_output(30)
managed_processes['qcomgpsd'].stop()
def test_turns_off_gnss(self, subtests):
for s in (0.1, 1, 5):
with subtests.test(runtime=s):
managed_processes['qcomgpsd'].start()
time.sleep(s)
managed_processes['qcomgpsd'].stop()
wait_for_modem()
resp = at_cmd("AT+QGPS?")
assert "+QGPS: 0" in resp