Skip to content
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 tests and continuous integration #4

Open
s-celles opened this issue May 2, 2018 · 6 comments
Open

Add unit tests and continuous integration #4

s-celles opened this issue May 2, 2018 · 6 comments
Assignees

Comments

@s-celles
Copy link

s-celles commented May 2, 2018

Hello,

I'm considering this library as a dependency for an application.
Althought I'd prefer to rely on a library which have unit tests.

You can find some links dealing with continuous integration and Arduino
https://github.com/adafruit/travis-ci-arduino
https://www.pololu.com/blog/654/continuous-testing-for-arduino-libraries-using-platformio-and-travis-ci
(they are using http://platformio.org/ )

Kind regards

PS : see also https://docs.travis-ci.com/user/integration/platformio/

https://github.com/platformio/platformio-remote-unit-testing-example

See also https://github.com/mmurdoch/arduinounit/

and discussion at mmurdoch/arduinounit#63

@SMFSW
Copy link
Owner

SMFSW commented May 2, 2018

First, thanks for your interest in using Queue library.

I understand your concern about unit tests.
To be totally honest, this library is declined in 2 flavors, Cpp & C (the last one being derived from former Queue lib). I have cQueue running every day since almost a year (not on arduino platform though, but still compiled with gcc), and making both libs evolve along with the other.
Queue is tested against multiple cores on Arduino platform (AVR, SAM, esp8266 mostly) before release, and I don't plan to integrate more things as I would like to keep these libs as tiny as possible (speaking about sw footprint). They are pretty safe to use for now as long as disabling interrupts if the use requires it (using inside interrupts) following warnings in doxygen comments.

The idea of having unit testing is seducing and as long as it remains free, I'm welcoming it, for this lib, any code I published and future ones!
I will investigate on the matter in the next few days (thanks for your links) in my spare time and try to see what I can do about it, starting with this lib.
I don't plan any milestone right now, but will update this issue tracking when I'll be able to evaluate the work needed.

Please keep an eye on this issue to get some updates and if you have more things to share about it!

Regards,
SMFSW

@SMFSW
Copy link
Owner

SMFSW commented May 2, 2018

Thanks for your links, it helped me to setup Travis CI more easily on a project.

Basic integration of Travis CI done on Queue library.

@SMFSW SMFSW closed this as completed May 2, 2018
@s-celles
Copy link
Author

s-celles commented May 3, 2018

This issue should probably be reopened since there is currently no real unit tests.
Currently we only ensure that this project can be build (after each commit).
Using modified examples as unit tests could be considered as a first try.

@SMFSW SMFSW reopened this May 3, 2018
@SMFSW SMFSW self-assigned this May 3, 2018
@s-celles
Copy link
Author

s-celles commented May 3, 2018

You should keep a track on https://github.com/ianfixes/arduino_ci/issues/42

@ianfixes
Copy link

ianfixes commented May 6, 2018

I noticed this issue linked from mine. Interestingly, a Queue implementation was the first real Arduino library I tested with arduino_ci. If you're looking for an example to copy from, it would be here: https://github.com/sdesalas/Arduino-Queue.h/pull/1/files

The .arduino-ci.yaml file in that PR might be problematic on versions after 0.1.7 due to https://github.com/ianfixes/arduino_ci/issues/44.

If you start using this for unit tests, I'll welcome any comments or criticism you have.

@s-celles
Copy link
Author

s-celles commented Jan 3, 2019

@ianfixes updated arduino_ci https://github.com/ianfixes/arduino_ci
You might have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants