Skip to content

Commit

Permalink
[manuf] Add --cp-only flag to orchestrator
Browse files Browse the repository at this point in the history
Signed-off-by: Noah Moroze <[email protected]>
  • Loading branch information
nmoroze authored and milesdai committed Dec 3, 2024
1 parent 4bf48b6 commit bd89a74
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions sw/host/provisioning/orchestrator/src/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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__":
Expand Down

0 comments on commit bd89a74

Please sign in to comment.