Description
Background
I've developed a system called arduino_ci
that enables Arduino libraries to be unit tested, both locally and remotely (as part of a service like Travis CI). Among other things, this includes abilities such as
- Fully simulating the physical world (e.g. clock
millis()
, pin inputs likedigitalRead()
, serial inputs, etc) - Testing against multiple boards with no hardware present
- TAP-formatted test output
Problem
The trick is where (in the library) to put the files that contain the tests. According to the specification:
An extras folder can be used by the developer to put documentation or other items to be bundled with the library. [...] The content of the extras folder is totally ignored by the IDE; you are free to put anything inside such as supporting documentation, etc.
I would prefer not to put tests in "extras/", both for closer proximity to the code begin tested and because (in my opinion) the ability to run tests is an important and necessary part of any software project. (Similar to how they are organized in modules for Java, Python, NodeJS, etc.)
Question
What chance is there of amending the library specification to ignore (whether that means whitelisting or blacklisting in this context) a directory called "test/" where all the automated tests would live? Alternately, could something similar to .gitignore
be used for that purpose?
See Also:
- Initial Arduino forum thread
- Arduino forum thread that led me here
- StackExchange writeup with more information
- Example of arduino_ci unit testing the Queue library
- Example of arduino_ci unit testing the Adafruit FONA library