encoder test speedup (#24601)

Co-authored-by: Comma Device <device@comma.ai>
pull/24630/head
Adeeb Shihadeh 3 years ago committed by GitHub
parent 238faf4810
commit d87f30ea06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      selfdrive/loggerd/tests/test_encoder.py

@ -143,20 +143,18 @@ class TestEncoder(unittest.TestCase):
shutil.rmtree(f"{route_prefix_path}--{i}")
try:
for i in trange(num_segments + 1):
for i in trange(num_segments):
# poll for next segment
with Timeout(int(SEGMENT_LENGTH*10), error_msg=f"timed out waiting for segment {i}"):
while Path(f"{route_prefix_path}--{i}") not in Path(ROOT).iterdir():
while Path(f"{route_prefix_path}--{i+1}") not in Path(ROOT).iterdir():
time.sleep(0.1)
check_seg(i)
finally:
managed_processes['loggerd'].stop()
managed_processes['encoderd'].stop()
managed_processes['camerad'].stop()
managed_processes['sensord'].stop()
for i in trange(num_segments):
check_seg(i)
if __name__ == "__main__":
unittest.main()

Loading…
Cancel
Save