Running automated unit tests on an Arduino library using Travis CI

I'm not sure how best to handle the "extras" folder. On one hand, it would be more consistent with the documentation as you pointed out. On the other hand, it would make the definitions of the tests a bit more kludgy by placing them further from the code that they're testing. And ultimately, I'd love it if the Arduino project itself would take unit testing more seriously and just have the IDE consider the "test" folder to be a normal and welcome addition to a project.

I don't expect that to happen in the foreseeable future though.

Can you give some examples of what you mean by a hardware package? I do have some capabilities to define compiler flags and custom platforms to test on, but I'm not sure whether that relates to what you're talking about. Do you have a link to the library in question?