LogReader: fix plotjuggler not reading properly (#31023)

* fix plotjuggler

* simpler

* fix juggler

* fix that
old-commit-hash: 61fe705160
This commit is contained in:
Justin Newberry
2024-01-16 15:40:49 -05:00
committed by GitHub
parent 4b7edec2b0
commit 5df01b3d22
4 changed files with 39 additions and 37 deletions

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env python3
import multiprocessing
import os
import sys
import platform
@@ -76,10 +75,7 @@ def process(can, lr):
def juggle_route(route_or_segment_name, can, layout, dbc=None):
sr = LogReader(route_or_segment_name)
with multiprocessing.Pool(24) as pool:
all_data = []
for p in pool.map(partial(process, can), sr.lrs):
all_data.extend(p)
all_data = sr.run_across_segments(24, partial(process, can))
# Infer DBC name from logs
if dbc is None:

View File

@@ -31,6 +31,8 @@ class TestPlotJuggler(unittest.TestCase):
self.assertEqual(p.poll(), None)
os.killpg(os.getpgid(p.pid), signal.SIGTERM)
self.assertNotIn("Raw file read failed", output)
# TODO: also test that layouts successfully load
def test_layouts(self):
bad_strings = (