|
|
|
@ -10,6 +10,8 @@ from openpilot.tools.lib.helpers import save_log |
|
|
|
|
if __name__ == "__main__": |
|
|
|
|
parser = argparse.ArgumentParser(description="Run process on route and create new logs", |
|
|
|
|
formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
|
|
|
|
parser.add_argument("--qlog", help="Use qlog instead of log", action="store_true") |
|
|
|
|
parser.add_argument("--fingerprint", help="The fingerprint to use") |
|
|
|
|
parser.add_argument("route", help="The route name to use") |
|
|
|
|
parser.add_argument("process", help="The process to run") |
|
|
|
|
args = parser.parse_args() |
|
|
|
@ -17,10 +19,10 @@ if __name__ == "__main__": |
|
|
|
|
cfg = [c for c in CONFIGS if c.proc_name == args.process][0] |
|
|
|
|
|
|
|
|
|
route = Route(args.route) |
|
|
|
|
lr = MultiLogIterator(route.log_paths()) |
|
|
|
|
lr = MultiLogIterator(route.qlog_paths() if args.qlog else route.log_paths()) |
|
|
|
|
inputs = list(lr) |
|
|
|
|
|
|
|
|
|
outputs = replay_process(cfg, inputs) |
|
|
|
|
outputs = replay_process(cfg, inputs, fingerprint=args.fingerprint) |
|
|
|
|
|
|
|
|
|
# Remove message generated by the process under test and merge in the new messages |
|
|
|
|
produces = {o.which() for o in outputs} |
|
|
|
|