Plugin test suite: Automate testing of 'algo test' FSM
A first version of a test suite that verifies the 'algo test' FSM on any board with a single command has been merged into the Serenity plugin repository in p2-xware/software/serenity-herd!31 (merged) (summary of functionality is in p2-xware/software/serenity-herd#3 (closed)).
Next step: Import the test implementation into this repository. This will allow it to be equally easily be used by all board-specific plugins, and streamline the process of running the tests themselves.
Key items:
-
Move test code under
src/swatch/test_plugin -
Create a dedicated docker image for running the test
-
docker/Dockerfile: Add a new target build stage -plugin-algo-fsm-tester- with appropriate entrypoint -
.gitlab-ci.yml: Add,plugin-algo-fsm-testerto the end ofIMAGE_SUFFIXESandBUILD_TARGETSin.build_imagesandbuild:image_manifestso that the CI automatically builds this new docker image
-
-
Some code cleanup - e.g:
- The
compareBufferWithReffunction is deliberately copied fromsrc/swatch/cli/board_data.py- should refactor to avoid that duplication - I spotted that both in here and in the FSM runner scripts we run
os.makedirsbefore running theFileResult.savemethod- It would be good to just add that to the
FileResult.savemethod insrc/swatch/action.py
- It would be good to just add that to the
- The
Edited by Tom Williams