tizi tests in jenkins (#27810)

* add

* mv there for now

* mv

* single panda

* move into parallel

* longer timeout for dfu

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: ff89184823
beeps
Adeeb Shihadeh 2 years ago committed by GitHub
parent dd0b8205a7
commit ed72cae737
  1. 14
      Jenkinsfile
  2. 5
      selfdrive/boardd/tests/test_boardd_loopback.py
  3. 6
      selfdrive/boardd/tests/test_pandad.py

14
Jenkinsfile vendored

@ -125,6 +125,20 @@ pipeline {
} }
*/ */
stage('tizi-tests') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
steps {
phone_steps("tizi", [
["build openpilot", "cd selfdrive/manager && ./build.py"],
["test boardd loopback", "SINGLE_PANDA=1 python selfdrive/boardd/tests/test_boardd_loopback.py"],
["test pandad", "python selfdrive/boardd/tests/test_pandad.py"],
["test sensord", "cd system/sensord/tests && python -m unittest test_sensord.py"],
["test camerad", "python system/camerad/test/test_camerad.py"],
["test exposure", "python system/camerad/test/test_exposure.py"],
])
}
}
stage('build') { stage('build') {
agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } } agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } }
environment { environment {

@ -40,8 +40,9 @@ class TestBoardd(unittest.TestCase):
sm.update(1000) sm.update(1000)
num_pandas = len(sm['pandaStates']) num_pandas = len(sm['pandaStates'])
if TICI: expected_pandas = 2 if TICI and "SINGLE_PANDA" not in os.environ else 1
self.assertGreater(num_pandas, 1, "connect another panda for multipanda tests") self.assertEqual(num_pandas, expected_pandas, "connected pandas ({num_pandas}) doesn't match expected panda count ({expected_pandas}). \
connect another panda for multipanda tests.")
# boardd blocks on CarVin and CarParams # boardd blocks on CarVin and CarParams
cp = car.CarParams.new_message() cp = car.CarParams.new_message()

@ -14,9 +14,9 @@ class TestPandad(unittest.TestCase):
def tearDown(self): def tearDown(self):
managed_processes['pandad'].stop() managed_processes['pandad'].stop()
def _wait_for_boardd(self): def _wait_for_boardd(self, timeout=30):
sm = messaging.SubMaster(['peripheralState']) sm = messaging.SubMaster(['peripheralState'])
for _ in range(30): for _ in range(timeout):
sm.update(1000) sm.update(1000)
if sm.updated['peripheralState']: if sm.updated['peripheralState']:
break break
@ -30,7 +30,7 @@ class TestPandad(unittest.TestCase):
time.sleep(1) time.sleep(1)
managed_processes['pandad'].start() managed_processes['pandad'].start()
self._wait_for_boardd() self._wait_for_boardd(60)
@phone_only @phone_only
def test_in_bootstub(self): def test_in_bootstub(self):

Loading…
Cancel
Save