Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a fixture testing tool for exercising gcode against real hardware. I'm using it to validate that I don't break basic functionality or simple corner cases with an automated test.
From the README.md...
GCode Fixture Tests
Basic tests sent to ESP32 hardware, to validate firmware behavior.
The
run_fixture
command is used to exercise a fixture on real hardware. Fixtures contain a list ofcommands to send to the ESP32, and a list of expected responses. The test runner will send the
commands to the ESP32, and compare the responses to the expected responses.
Install the tool's dependencies with pip:
Supported operations:
# ...
: Comment->
: Send a command to the ESP32<-
: Expect a response from the ESP32<~
: Expect an optional message from the ESP32, but on mismatch, continue the test<|
: Expect one of the following responses from the ESP32The tool can be ran with either a directory, or a single file. If a directory is provided, the tool
will run all the files ending in
.nc
in the directory.Example, checking alarm state:
Example, checking idle status reporting: