parent
63779c385d
commit
e13630dfee
|
@ -145,10 +145,10 @@ pipeline {
|
|||
stages {
|
||||
stage('parallel tests') {
|
||||
parallel {
|
||||
stage('Devel Tests') {
|
||||
stage('C2: build') {
|
||||
steps {
|
||||
phone_steps("eon-build", [
|
||||
["build devel", "cd $SOURCE_DIR/release && EXTRA_FILES='tools/' ./build_devel.sh"],
|
||||
["build master-ci", "cd $SOURCE_DIR/release && EXTRA_FILES='tools/' ./build_devel.sh"],
|
||||
["build openpilot", "cd selfdrive/manager && ./build.py"],
|
||||
["test manager", "python selfdrive/manager/test/test_manager.py"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
|
@ -157,7 +157,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('Replay Tests') {
|
||||
stage('C2: replay') {
|
||||
steps {
|
||||
phone_steps("eon2", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
|
@ -166,7 +166,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('HW + Unit Tests') {
|
||||
stage('C2: HW + Unit Tests') {
|
||||
steps {
|
||||
phone_steps("eon", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
|
@ -201,19 +201,22 @@ pipeline {
|
|||
}
|
||||
*/
|
||||
|
||||
stage('tici Build') {
|
||||
stage('C3: build') {
|
||||
environment {
|
||||
R3_PUSH = "${env.BRANCH_NAME == 'master' ? '1' : ' '}"
|
||||
}
|
||||
steps {
|
||||
phone_steps("tici", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
["build master-ci", "cd $SOURCE_DIR/release && EXTRA_FILES='tools/' ./build_devel.sh"],
|
||||
["build openpilot", "cd selfdrive/manager && ./build.py"],
|
||||
["test manager", "python selfdrive/manager/test/test_manager.py"],
|
||||
["onroad tests", "cd selfdrive/test/ && ./test_onroad.py"],
|
||||
["test car interfaces", "cd selfdrive/car/tests/ && ./test_car_interfaces.py"],
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage('HW + Unit Tests (tici)') {
|
||||
stage('C3: HW + Unit Tests') {
|
||||
steps {
|
||||
phone_steps("tici2", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
|
@ -224,7 +227,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('EON camerad') {
|
||||
stage('C2: camerad') {
|
||||
steps {
|
||||
phone_steps("eon-party", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
|
@ -234,7 +237,7 @@ pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
stage('tici camerad') {
|
||||
stage('C3: camerad') {
|
||||
steps {
|
||||
phone_steps("tici-party", [
|
||||
["build", "cd selfdrive/manager && ./build.py"],
|
||||
|
|
|
@ -4,33 +4,18 @@ import random
|
|||
import time
|
||||
import unittest
|
||||
from collections import defaultdict
|
||||
from functools import wraps
|
||||
|
||||
import cereal.messaging as messaging
|
||||
from cereal import car
|
||||
from common.params import Params
|
||||
from common.spinner import Spinner
|
||||
from common.timeout import Timeout
|
||||
from panda import Panda
|
||||
from selfdrive.boardd.boardd import can_list_to_can_capnp
|
||||
from selfdrive.car import make_can_msg
|
||||
from selfdrive.hardware import TICI
|
||||
from selfdrive.test.helpers import phone_only, with_processes
|
||||
|
||||
|
||||
def reset_pandas(f):
|
||||
@wraps(f)
|
||||
def wrapper(*args, **kwargs):
|
||||
for serial in Panda.list():
|
||||
p = Panda(serial)
|
||||
for i in [0, 1, 2, 3, 0xFFFF]:
|
||||
p.can_clear(i)
|
||||
p.reset()
|
||||
p.close()
|
||||
f(*args, **kwargs)
|
||||
return wrapper
|
||||
|
||||
|
||||
class TestBoardd(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
|
@ -44,7 +29,6 @@ class TestBoardd(unittest.TestCase):
|
|||
cls.spinner.close()
|
||||
|
||||
@phone_only
|
||||
@reset_pandas
|
||||
@with_processes(['pandad'])
|
||||
def test_loopback(self):
|
||||
# wait for boardd to init
|
||||
|
@ -75,7 +59,7 @@ class TestBoardd(unittest.TestCase):
|
|||
can = messaging.sub_sock('can', conflate=False, timeout=100)
|
||||
time.sleep(0.2)
|
||||
|
||||
n = 1000
|
||||
n = 200
|
||||
for i in range(n):
|
||||
self.spinner.update(f"boardd loopback {i}/{n}")
|
||||
|
||||
|
|
|
@ -102,8 +102,7 @@ class TestEncoder(unittest.TestCase):
|
|||
|
||||
# TODO: this ffprobe call is really slow
|
||||
# check frame count
|
||||
cmd = f"ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames \
|
||||
-of default=nokey=1:noprint_wrappers=1 {file_path}"
|
||||
cmd = f"ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 {file_path}"
|
||||
if TICI:
|
||||
cmd = "LD_LIBRARY_PATH=/usr/local/lib " + cmd
|
||||
|
||||
|
|
|
@ -117,15 +117,15 @@ class TestLoggerd(unittest.TestCase):
|
|||
expected_files.add("ecamera.hevc")
|
||||
|
||||
# give camerad time to start
|
||||
time.sleep(5)
|
||||
time.sleep(3)
|
||||
|
||||
for _ in range(5):
|
||||
num_segs = random.randint(1, 10)
|
||||
length = random.randint(2, 5)
|
||||
num_segs = random.randint(2, 5)
|
||||
length = random.randint(1, 3)
|
||||
os.environ["LOGGERD_SEGMENT_LENGTH"] = str(length)
|
||||
|
||||
managed_processes["loggerd"].start()
|
||||
time.sleep((num_segs + 1) * length)
|
||||
time.sleep(num_segs*length + 1)
|
||||
managed_processes["loggerd"].stop()
|
||||
|
||||
route_path = str(self._get_latest_log_dir()).rsplit("--", 1)[0]
|
||||
|
@ -177,7 +177,9 @@ class TestLoggerd(unittest.TestCase):
|
|||
# sleep enough for the first poll to time out
|
||||
# TOOD: fix loggerd bug dropping the msgs from the first poll
|
||||
managed_processes["loggerd"].start()
|
||||
time.sleep(2)
|
||||
for s in services:
|
||||
while not pm.all_readers_updated(s):
|
||||
time.sleep(0.1)
|
||||
|
||||
sent_msgs = defaultdict(list)
|
||||
for _ in range(random.randint(2, 10) * 100):
|
||||
|
@ -220,9 +222,11 @@ class TestLoggerd(unittest.TestCase):
|
|||
pm = messaging.PubMaster(services)
|
||||
|
||||
# sleep enough for the first poll to time out
|
||||
# TOOD: fix loggerd bug dropping the msgs from the first poll
|
||||
# TODO: fix loggerd bug dropping the msgs from the first poll
|
||||
managed_processes["loggerd"].start()
|
||||
time.sleep(2)
|
||||
for s in services:
|
||||
while not pm.all_readers_updated(s):
|
||||
time.sleep(0.1)
|
||||
|
||||
sent_msgs = defaultdict(list)
|
||||
for _ in range(random.randint(2, 10) * 100):
|
||||
|
@ -233,9 +237,8 @@ class TestLoggerd(unittest.TestCase):
|
|||
m = messaging.new_message(s, random.randint(2, 10))
|
||||
pm.send(s, m)
|
||||
sent_msgs[s].append(m)
|
||||
time.sleep(0.01)
|
||||
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
managed_processes["loggerd"].stop()
|
||||
|
||||
lr = list(LogReader(os.path.join(self._get_latest_log_dir(), "rlog.bz2")))
|
||||
|
|
|
@ -5,7 +5,7 @@ import time
|
|||
import unittest
|
||||
|
||||
import selfdrive.manager.manager as manager
|
||||
from selfdrive.hardware import EON
|
||||
from selfdrive.hardware import EON, TICI, HARDWARE
|
||||
from selfdrive.manager.process import DaemonProcess
|
||||
from selfdrive.manager.process_config import managed_processes
|
||||
|
||||
|
@ -37,8 +37,8 @@ class TestManager(unittest.TestCase):
|
|||
|
||||
# ensure all processes exit cleanly
|
||||
def test_clean_exit(self):
|
||||
HARDWARE.set_power_save(False)
|
||||
manager.manager_prepare()
|
||||
|
||||
for p in ALL_PROCESSES:
|
||||
managed_processes[p].start()
|
||||
|
||||
|
@ -49,7 +49,7 @@ class TestManager(unittest.TestCase):
|
|||
self.assertTrue(state.running, f"{p} not running")
|
||||
|
||||
exit_code = managed_processes[p].stop(retry=False)
|
||||
if (p == 'ui') or (EON and p == 'logcatd'):
|
||||
if (TICI and p in ['ui', 'navd']) or (EON and p == 'logcatd'):
|
||||
# TODO: make Qt UI exit gracefully
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue