diff --git a/selfdrive/test/process_replay/process_replay.py b/selfdrive/test/process_replay/process_replay.py index ee07adf52bcafd..d71818e22672ac 100755 --- a/selfdrive/test/process_replay/process_replay.py +++ b/selfdrive/test/process_replay/process_replay.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import os +import sys import threading import importlib import shutil @@ -21,7 +22,12 @@ def wait_for_event(evt): if not evt.wait(15): - raise Exception("Timeout reached. Thread likely crashed.") + if threading.currentThread().getName() == "MainThread": + # tested process likely died. don't let test just hang + raise Exception("Timeout reached. Tested process likely crashed.") + else: + # done testing this process, let it die + sys.exit(0) class FakeSocket: def __init__(self, wait=True):