From bd89a74c193c634e2011def93f6b97bbbe6ef135 Mon Sep 17 00:00:00 2001 From: Noah Moroze Date: Tue, 3 Dec 2024 03:54:55 +0000 Subject: [PATCH] [manuf] Add --cp-only flag to orchestrator Signed-off-by: Noah Moroze --- .../orchestrator/src/orchestrator.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sw/host/provisioning/orchestrator/src/orchestrator.py b/sw/host/provisioning/orchestrator/src/orchestrator.py index 86310ce5a9dc2..9a6cc4e5992fb 100644 --- a/sw/host/provisioning/orchestrator/src/orchestrator.py +++ b/sw/host/provisioning/orchestrator/src/orchestrator.py @@ -114,6 +114,11 @@ def main(args_in): default="logs", help="Root directory to store log files under.", ) + parser.add_argument( + "--cp-only", + action="store_true", + help="If set, only run CP stage (skips FT and database write).", + ) args = parser.parse_args(args_in) # All relative paths are relative to the runfiles directory. @@ -160,11 +165,14 @@ def main(args_in): fpga=args.fpga, require_confirmation=not args.non_interactive) dut.run_cp() - dut.run_ft() - - device_record = db.DeviceRecord.from_dut(dut) - device_record.upsert(db_handle) - logging.info(f"Added DeviceRecord to database: {device_record}") + if not args.cp_only: + dut.run_ft() + + device_record = db.DeviceRecord.from_dut(dut) + device_record.upsert(db_handle) + logging.info(f"Added DeviceRecord to database: {device_record}") + else: + logging.info("FT skipped since --cp-only was provided") if __name__ == "__main__":