Skip to content

Commit

Permalink
[manuf] Clean up --cp-only handling in 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 timothytrippel committed Dec 5, 2024
1 parent 3e4925d commit 25dfdf4
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions sw/host/provisioning/orchestrator/src/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,18 +163,19 @@ def main(args_in):
fpga=args.fpga,
require_confirmation=not args.non_interactive)
dut.run_cp()
if not args.cp_only:
dut.run_ft()
if args.cp_only:
logging.info("FT skipped since --cp-only was provided")
return

db_path = Path(args.db_path)
db_handle = db.DB(db.DBConfig(db_path=db_path))
db.DeviceRecord.create_table(db_handle)
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")
db_path = Path(args.db_path)
db_handle = db.DB(db.DBConfig(db_path=db_path))
db.DeviceRecord.create_table(db_handle)

device_record = db.DeviceRecord.from_dut(dut)
device_record.upsert(db_handle)
logging.info(f"Added DeviceRecord to database: {device_record}")


if __name__ == "__main__":
Expand Down

0 comments on commit 25dfdf4

Please sign in to comment.