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 (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-tester
to the end ofIMAGE_SUFFIXES
andBUILD_TARGETS
in.build_images
andbuild:image_manifest
so that the CI automatically builds this new docker image
-
-
Some code cleanup - e.g:
- The
compareBufferWithRef
function 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.makedirs
before running theFileResult.save
method- It would be good to just add that to the
FileResult.save
method insrc/swatch/action.py
- It would be good to just add that to the
- The
Edited by Tom Williams