run_process_on_route: qlog and fingerprint options (#30688)
Add --qlog and --fingerprint options for run_process_on_route old-commit-hash: 804973155344f39e839e5d11669db42287f866d6
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user