run_process_on_route: qlog and fingerprint options (#30688)

Add --qlog and --fingerprint options for run_process_on_route
pull/30690/head
Kacper Rączy 1 year ago committed by GitHub
parent 7b5d4d031a
commit 8049731553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      selfdrive/debug/run_process_on_route.py

@ -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}

Loading…
Cancel
Save