Hi there,
I’m building a tool that performs diagnostics on DUTs. The tool first establishes a connection to the DUT, then a workflow is selected from a list to be performed on the DUT. A workflow can do things like update the DUT firmware or reprogram the DUT. Each workflow is created as a separate test plan. During a DUT diagnostic session, several workflows can be done to reconfigure the DUT.
Here’s where it gets tricky: I want the DUT connection to be established in the beginning and maintained for the subsequent execution of different workflows’ test plans. Each DUT connection takes 5-10 seconds to establish, so it would be slow if it had to be done for every test plan execution.
I’ve considered several approaches, such as,
- 1. simply allowing DUT Open to be called each time a workflow’s test plan is loaded and only calling Close when the diagnostic session is over. There’s a risk when opening a workflow plan fails on resource loading like a result listener connection, which would close the DUT connection too.
- 2.reference counting to guard the DUT Open and Close. This could possibly work, but it seems like a janky reinvention of resource management.
- 3.TestPlanReference to each workflow within an anchor test plan. This falls apart when workflows are added or removed because the anchor test plan needs to be updated too. I understand that dynamic test plan references are not allowed once a test plan is loaded.
I’d appreciate it if I can get a nudge in the right direction. Is what I want to achieve even possible or practical in OpenTAP?
