-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit testing #36
Comments
I was thinking of a second script (or number of scripts) that knows how to reply correctly or incorrectly to specific commands. Edit: The main script ("host") and the device script would talk over FIFOs. This would be sufficient to test everything except serial transport. We can then put it on travis (?) and perhaps even look into codeclimate. Or maybe I'm just exaggerating now... |
Travis sounds good to me, I'll have a look if I can set something up. I also had a second script in mind that basically emulates the boot loader in the different chips. A FIFOs would work, but what do you think about creating a virtual tty via python (http://askubuntu.com/questions/9396/virtual-serial-port-for-testing-purpose) and connecting the bootloader sim to it on one side, and the script on the other side? That way we can test the script closer to 'the real thing'. Not sure if possible, but this way we could test the clock switch a little better (opening the port at a different speed by the script). I was also thinking, parallel to the sim that we could run on travis, to have a makefile which goes through all the possible scenarios of uploading firmware per platform (as in chip). This then could be used to quickly check the script with real HW connected to a computer. |
That looks very promising!
Sounds useful, but I cannot immediately think how we can do this without requiring someone to manually put the device back to bootloader mode between executions. |
Figure out how to do some kind of unit testing.
This will be pretty complicated since real hardware is probably needed to do all the tests (and there's currently 3 different supported platforms).
The text was updated successfully, but these errors were encountered: