From e631d24d777ce95411df65be2fbc8a62d06828d0 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 3 May 2023 16:52:20 -0700 Subject: [PATCH] Jenkins tuneup (#28095) * tuneup * use service messages * logmono * not passive old-commit-hash: d5a0a4b3e8a52b5a0e1da325c15cdb99d2a71350 --- Jenkinsfile | 8 +------- selfdrive/test/test_onroad.py | 10 +++++++--- system/hardware/tici/tests/test_power_draw.py | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b861df7d67..8978459689 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -185,7 +185,7 @@ pipeline { } } - stage('camerad-ar') { + stage('camerad') { agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } } steps { phone_steps("tici-ar0231", [ @@ -193,12 +193,6 @@ pipeline { ["test camerad", "python system/camerad/test/test_camerad.py"], ["test exposure", "python system/camerad/test/test_exposure.py"], ]) - } - } - - stage('camerad-ox') { - agent { docker { image 'ghcr.io/commaai/alpine-ssh'; args '--user=root' } } - steps { phone_steps("tici-ox03c10", [ ["build", "cd selfdrive/manager && ./build.py"], ["test camerad", "python system/camerad/test/test_camerad.py"], diff --git a/selfdrive/test/test_onroad.py b/selfdrive/test/test_onroad.py index 8faecac82c..679ba363f4 100755 --- a/selfdrive/test/test_onroad.py +++ b/selfdrive/test/test_onroad.py @@ -2,6 +2,7 @@ import math import json import os +import shutil import subprocess import time import numpy as np @@ -53,7 +54,7 @@ PROCS = { "selfdrive.boardd.pandad": 0, "selfdrive.statsd": 0.4, "selfdrive.navd.navd": 0.4, - "system.loggerd.uploader": 30.0, + "system.loggerd.uploader": 4.0, "system.loggerd.deleter": 0.1, "selfdrive.locationd.laikad": None, # TODO: laikad cpu usage is sporadic } @@ -94,14 +95,17 @@ class TestOnroad(unittest.TestCase): return # setup env + os.environ['PASSIVE'] = "0" os.environ['REPLAY'] = "1" os.environ['SKIP_FW_QUERY'] = "1" os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019" - os.environ['LOGPRINT'] = 'debug' + os.environ['LOGPRINT'] = "debug" params = Params() params.clear_all() set_params_enabled() + if os.path.exists(ROOT): + shutil.rmtree(ROOT) # Make sure athena isn't running os.system("pkill -9 -f athena") @@ -299,7 +303,7 @@ class TestOnroad(unittest.TestCase): result += "----------------- Service Timings --------------\n" result += "------------------------------------------------\n" for s, (maxmin, rsd) in TIMINGS.items(): - msgs = [m.logMonoTime for m in self.lr if m.which() == s] + msgs = [m.logMonoTime for m in self.service_msgs[s]] if not len(msgs): raise Exception(f"missing {s}") diff --git a/system/hardware/tici/tests/test_power_draw.py b/system/hardware/tici/tests/test_power_draw.py index f563933285..df4852183e 100755 --- a/system/hardware/tici/tests/test_power_draw.py +++ b/system/hardware/tici/tests/test_power_draw.py @@ -16,11 +16,11 @@ class Proc: name: str power: float rtol: float = 0.05 - atol: float = 0.1 + atol: float = 0.12 warmup: float = 6. PROCS = [ - Proc('camerad', 2.15), + Proc('camerad', 2.1), Proc('modeld', 0.93, atol=0.2), Proc('dmonitoringmodeld', 0.4), Proc('encoderd', 0.23), @@ -60,7 +60,7 @@ class TestPowerDraw(unittest.TestCase): manager_cleanup() tab = [] - tab.append(['process', 'expected (W)', 'current (W)']) + tab.append(['process', 'expected (W)', 'measured (W)']) for proc in PROCS: cur = used[proc.name] expected = proc.power