jankae / LibreVNA

100kHz to 6GHz 2 port USB based VNA
GNU General Public License v3.0
1.13k stars 210 forks source link

Update integration tests for SCPI improvements #250

Closed scott-guthridge closed 7 months ago

scott-guthridge commented 7 months ago

libraVNA.cmd() no longer expects blank line responses. By default, it checks status after each command to match the previous behavior. Check can be disabled by optional cmd() parameter for handling expected failure cases, or by turning off the default flag.

Commands such as *WAI may take longer than anything previously. Make it possible to override the default time-out in cmd() and query().

Change poll loops in TestCalibration and TestVNASweep to *WAI calls.

Note: Not tested with LibreCAL

scott-guthridge commented 7 months ago

So far, first commit is just to make the existing regression tests pass again. I tried to do it with minimal diffs. Changes are slightly more extensive in the libreVNA class where it was necessary to pass a time-out argument through several functions.

I will follow-up with at least one more commit to test new functionality.

scott-guthridge commented 7 months ago

I'm finished with additions. Two tests in TestRST are commented out with TODO-check comments related to earlier conversation regarding whether RST should disable outputs until automation program has a chance to complete its setup. One test in TestStatusRegisters auto-detects that SRE, SRE? and STB? are not implemented and skips the test.

Please review.

jankae commented 7 months ago

Thanks for all the work, this looks good for almost all tests. I had to make a couple of changes in the tests you couldn't run (the ones that require a LibreCAL to be connected) and I also added code to reset the external reference during a *RST command now