Comments (10)
- all tests in a file
bundle exec arduino_ci_remote.rb -file interesting-tests-file
- multiples and combinations of each
bundle exec arduino_ci_remote.rb -file test-file -test some-test -test some-other-test
This is implemented in #84 as:
- whitelisting all tests in a file
bundle exec arduino_ci_remote.rb --testfile-select=interesting-tests-file
- blacklisting all tests in a file
bundle exec arduino_ci_remote.rb --testfile-reject=boring-tests-file
- multiples and combinations of each (as globs)
bundle exec arduino_ci_remote.rb --testfile-select=tests-interesting*.cpp --testfile-reject=tests-interesting-but-not-that-interesting.cpp
from arduino_ci.
Fix is live in 0.1.17
from arduino_ci.
What about making a Ruby script directly inspired by py.test or nosetests which is able to automatically discover unit tests (ie files whith name starting with test_...
After installing this Ruby package, this script could be available from any directory.
from arduino_ci.
https://docs.pytest.org/en/latest/usage.html
from arduino_ci.
I enable targeting (somewhat) with the configuration:
unittest:
testfiles:
select:
- "*-*.*"
reject:
- "sam-squamsh.*"
So what's involved here is just to let the file matching come from the command line as well.
Unfortunately, I'm not sure about selecting individual tests. Those come from macros within C++, so ruby has no knowledge of what they are and no ability to control which tests run when the executable runs.
So this fits into the larger idea of "have a way for the C++ test code to communicate (hopefully bidirectionally) with the Ruby runner", and I'd like to have a bigger, more future-proof plan in mind before I go down that path. (For example, I could push up all the reporting into Ruby instead of trying to make all the console logs look pretty even though they are coming from a mix of different binaries)
TL;DR in the short term I'd make use of an overriding .arduino-ci.yml
file in your project directory to target just the file you're working on.test/
unittest:
testfiles:
select:
- "file-im-working-on-right-now.cpp"
from arduino_ci.
@scls19fr did that workaround serve your needs? I'm trying to figure out what areas of this project to focus on during 2019.
from arduino_ci.
I think this idea could fit most of usecases but we can't really be sure of it until trying with many libraries...
Maybe a default .arduino-ci.yml
like
unittest:
testfiles:
select:
- "test_*.cpp"
could be used
I think we should have a look in http://downloads.arduino.cc/libraries/library_index.json for libraries that could be tested and advocate in arduino/Arduino#7567 for better testing of Arduino libraries.
Maybe people like @per1234 @mmurdoch @toddtreece @ladyada @deanm1278 @cmaglie could bring their opinion about such a global effort to insure quality of Arduino libraries.
I really think this can only come with a collective effort... maybe a new year resolution?
Best wishes!
from arduino_ci.
Being able to use command line parameters to overhide config file could help a lot
from arduino_ci.
My apologies, #82 has been going on all this time.
In the short term I can provide command-line overrides of files, but overriding tests will require some additional effort (since Ruby can't know the test names until they get executed). It will require some as-yet-unimplemented glue between the Ruby and compiled C++ environments, and I've opened #83 to track that.
If an inability to specify unit tests by name (within a given test.cpp file) is still a problem, please open a separate issue for that.
from arduino_ci.
Thanks @ianfixes. I can perfectly use one file per unit test as a temporary workaround. Being able to run just one test file was the most important feature I was looking for because it should drastically speedup my development (not having to wait all project tests are running fine).
from arduino_ci.
Related Issues (20)
- Output errors to stderr HOT 11
- Empty examples folder causes build to fail HOT 2
- arduino_ci.rb fails to report compile error
- The build-CI does not support setWireTimeout(). HOT 1
- Can RP2040 build environment be supported? HOT 10
- compiling unit tests uses arduino platform specific code HOT 6
- running in gitlab CI HOT 3
- Platform.io Support HOT 3
- Improve factorization of "unused space"
- Running "bundle install --path vendor/bundle" generates deprecated warning HOT 1
- Use temporary directories for unit test artifacts
- ESP32 failing to install in CI build HOT 2
- Update documentation to recommend version pinning
- ESP32 flags unused function as error (should be warning) HOT 9
- libraries: "SoftwareSerial" does not work. HOT 11
- "Bad file descriptor" error when installing HOT 2
- Implement Wire.h slave device mock support
- 1.6.0 error: undefined method `library_of_name' for nil:NilClass (NoMethodError) HOT 5
- Show differences lined up and in quotes
- Unable to find library location on Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino_ci.