Ensure Athena is not running during onroad tests (#21088)

* ensure Athena is not running during onroad tests

* do from unittest
old-commit-hash: 6fe7fcd6e9a31a0b5101c7b0fe7a2867168738b4
This commit is contained in:
Willem Melching
2021-05-31 14:55:20 +02:00
committed by GitHub
parent 5441d1f348
commit bb18f7beb3
+6
View File
@@ -12,6 +12,7 @@ import cereal.messaging as messaging
from cereal.services import service_list
from common.basedir import BASEDIR
from common.timeout import Timeout
from common.params import Params
from selfdrive.hardware import TICI
from selfdrive.loggerd.config import ROOT
from selfdrive.test.helpers import set_params_enabled
@@ -98,6 +99,11 @@ class TestOnroad(unittest.TestCase):
os.environ['FINGERPRINT'] = "TOYOTA COROLLA TSS2 2019"
set_params_enabled()
# Make sure athena isn't running
Params().delete("DongleId")
Params().delete("AthenadPid")
subprocess.check_call(["pkill", "-9", "-f", "athena"])
logger_root = Path(ROOT)
initial_segments = set()
if logger_root.exists():