You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable Arduino library developers to accept contributions more easily, and increase the amount of GitHub collaboration
What
A cross-platform framework for compilation-verification and unit-testing Arduino libraries
How
By mocking out the Arduino hardware (and providing automation scripts that can run both locally and remotely), maintainers can enforce tests on code without requiring hardware present
Context: this repo doesn't provide for unit testing, and PlatformIO isn't Free Software. But install.sh inspired me to write my own alternative CI system called arduino_ci that accomplishes both, and it seems appropriate to submit my work for your consideration.
Live Demonstrations
Adafruit FONA library
This pull request against the FONA library shows arduino_ci as a drop-in replacement for travis-ci-arduino. It includes an example of mocking out a hardware device (in this case, a modem) to perform what would otherwise be a hardware-in-the-loop test.
In other words, the fake serial device allows us to see whether expected hardware responses produce the appropriate behavior in the library.
Unit testing capabilities give Travis CI the ability to validate the logic as part of the pull request process.
Testing configuration is provided by a set of YAML files (all optional -- default behavior is identical to install.sh). This opens the possibility of parallelized testing by launching several different jobs with their own configuration.
Ability to specify custom boards for download and mocking. This is of particular interest to manufacturers of boards :)
The text was updated successfully, but these errors were encountered:
ianfixes
changed the title
For your consideration: Enabling unit tests on Travis CI using a different script
For your consideration: Enabling unit tests on Travis CI using a different CI script
Mar 7, 2018
Brief update: as of v0.1.10, arduino_ci is now fully automated across Windows, OSX, and Linux hosts. You can write your tests under one OS and have them run and pass under another OS with the same outcomes.
Crucially, you can run the unit tests both locally and remotely with the same script.
Purpose
Context: this repo doesn't provide for unit testing, and PlatformIO isn't Free Software. But
install.sh
inspired me to write my own alternative CI system calledarduino_ci
that accomplishes both, and it seems appropriate to submit my work for your consideration.Live Demonstrations
Adafruit FONA library
This pull request against the FONA library shows
arduino_ci
as a drop-in replacement fortravis-ci-arduino
. It includes an example of mocking out a hardware device (in this case, a modem) to perform what would otherwise be a hardware-in-the-loop test.In other words, the fake serial device allows us to see whether expected hardware responses produce the appropriate behavior in the library.
Adafruit WS2801 library
This pull request against the WS2801 library shows
arduino_ci
running in a parallel TravisCI job withtravis-ci-arduino
, to show that the run times are roughly equivalent.Additionally, the unit test runner uses memory address sanitization to isolate memory access issues. This stack trace in an
arduino_ci
build job shows the source of a bug for which I've submitted the corresponding fixCapability not present in
travis-ci-arduino
install.sh
). This opens the possibility of parallelized testing by launching several different jobs with their own configuration.The text was updated successfully, but these errors were encountered: