xmos / sw_usb_audio

XMOS USB Audio reference design
Other
35 stars 18 forks source link

Improve reliability of starting the audio analyzer #208

Closed danielpieczko closed 9 months ago

danielpieczko commented 9 months ago

The xrun command to launch the audio analyzer firmware is run using a Python subprocess, which means that the execution flow returns to the Python test script before we know that the audio analyzer is running. This is necessary for cases where we attach via xscope, as we need the analyzer output to determine the test result. But for cases where the output is not needed (input tests where we just need the analyzer to generate signals), it is more robust to block until the xrun command completes by using subprocess.run(). There are test cases that didn't connect via xscope but still tried to print out the output from the analyzer when the test failed - these were not useful because there is no analyzer output when we don't attach with xscope.