Plugin test suite: Automate testing of 'link test' FSM
Goal: Ability to fully verify the 'link test' FSM on any board, with links configured in loopback, via a single command.
Very similar to p2-xware/software/serenity-herd#3 (closed) & #3 (closed), but for the link test FSM - i.e:
The test suite should pretty much do the same as for the 'algo test' FSM with a few minor modifications:
- Run the link test setup transition once, then run the 'configure rx' + 'configure tx' + 'capture' transitions one or more times (based on how many input data files have been supplied)
- Check the monitoring status of the device after running each transition
- Check that only the expected set of monitorable objects are enabled after each transition - in this case, TTC interface, input ports & output ports; other components should be disabled.
- Check I/O data after each capture transition:
- Compare captured TX buffers with injected data
- Compare captured RX buffers with injected data - should be offset by user specified latency range
I think that we can have the same command line flags as for the algo test FSM.
As a reference for implementation, the corresponding test runner is main_link_test
in src/swatch/cli/demonstrators.py
(user guide here) - however that function is designed to be able to configure a system of boards, whereas for this test suite, we only need to configure a single board.