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

[Feature Request] Move "test" sketches into "examples" folder #15

Closed
aentinger opened this issue Sep 6, 2023 · 4 comments
Closed

[Feature Request] Move "test" sketches into "examples" folder #15

aentinger opened this issue Sep 6, 2023 · 4 comments
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement

Comments

@aentinger
Copy link
Contributor

Normally we store only host-executed unit tests within the extra/tests sub-folder.

Moving those sketches over in the examples folders has the added benefit of finding them quickly via the IDE.

@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Sep 6, 2023
@aliphys
Copy link
Contributor

aliphys commented Sep 6, 2023

Thanks for highlighting this @aentinger 🌷

The rational for having the tests in the extras/tests subfolder was mentioned as part of arduino/arduino-lint#588 . Specifically:

Including test sketches, which have no/little pedagogical value, will increase the complexity of the user experience. Advanced users can always see the test sketches in the repository or local installation of the library.

@sebromero
Copy link
Contributor

These tests are more like functional tests, so, yes maybe they should be in a different place. I agree though, that I don't want the end users to see them as they are not meant to be executed by them. We have separate sketches to demonstrate the features of this library. What if we create a new folder functional-tests? Would that make it clearer?

@aliphys
Copy link
Contributor

aliphys commented Sep 7, 2023

@sebromero If we create a new folder called functional-tests, it would need to be inside the extras folder: extras/functional-tests.

Rule LD003 of the linter does not allow for any .ino sketches to be outside the examples or extras (sub)folders.

A sketch was found outside the library's examples and/or extras subfolders. Example sketches must be placed in the standardized location.

https://github.com/arduino/arduino-lint/blob/9e5ae478fffcb39f42d8dce7911912891e12b5ad/internal/rule/ruleconfiguration/ruleconfiguration.go#L1303-L1319

@sebromero
Copy link
Contributor

@aliphys Sure that's what I meant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

5 participants