Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add --skip-compile and --skip-unittest options to arduino_ci_remote.rb #93

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

Closed
s-celles opened this issue Jan 23, 2019 · 3 comments
Closed
Labels
ci scripts The test runner scripts enhancement New feature or request

Comments

@s-celles
Copy link
Contributor

Hello,

$ bundle exec arduino_ci_remote.rb --testfile-select=test/test_*.cpp

shouldn't compile examples

or we should have a flag to disable compiling examples such as

$ bundle exec arduino_ci_remote.rb --testfile-select=test/test_*.cpp --examples-reject=*

Kind regards

@hlovdal
Copy link
Contributor

hlovdal commented Jan 26, 2019

@scls19fr There already is a --testfile-reject option (since version 0.1.17) that seems to do what you are asking for. Is that insufficient? What criteria do you have for something to be an example that should not be compiled?

@s-celles
Copy link
Contributor Author

It doesn't work as expected

$ bundle exec arduino_ci_remote.rb --testfile-select=test_led.cpp --testfile-reject=*
Located Arduino binary...                                /Users/scls/Arduino.app
{:compilers=>["g++"], :libraries=>nil, :platforms=>["uno"]}
{:compilers=>["g++"], :libraries=>nil, :platforms=>["uno"], :testfiles=>{:select=>["test_led.cpp"], :reject=>["*"]}}
The set of compilers (1) isn't empty...                                        ✓
Checking g++ version...
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 10.0.0 (clang-1000.11.45.5)
    Target: x86_64-apple-darwin17.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
...Checking g++ version                                                        ✓
libasan availability for g++...                                             true
Requested unittest platform 'uno' is defined in 'platforms' YML...             ✓
Indexing libraries...                                                          ✓
Installing library under test...                                               ✓
Library installed at... /Users/scls/Documents/Arduino/libraries/ArduinoPartsPushButton
Requested library example platform 'uno' is defined in 'platforms' YML...      ✓
Using built-in board package...                                      arduino:avr
Installing board package arduino:avr...                                        ✓
Setting compiler warning level...                                              ✓
Switching to board for uno (arduino:avr:uno)...                                ✓
Verifying 1_on_off.ino...                                                      ✓
Verifying 2_led_blink_forever.ino...                                           ✓
Failures: 0

Examples are compiled despite I don't want them to be compiled (because I fix first code and unit tests and only after this, I fix examples).

You can also notice that unit test file test_led.cpp is not run despite being explicitly selected.
(it's both selected and rejected according glob... so it's rejected with such an implementation !)

@ianfixes
Copy link
Collaborator

ianfixes commented Jan 28, 2019

The behavior of arduino_ci_remote.rb is to be the end-all-be-all for remote CI. (I had intended to make a matching script for local testing, but I felt it was wiser to use one script in both places... and the name had stuck.) What this means is that both unit testing and compilation of examples/ always happen.

What's missing here is a set of flags like --skip-unittest and --skip-compilation. I will add those to the next release.

@ianfixes ianfixes added enhancement New feature or request ci scripts The test runner scripts labels Jan 28, 2019
@ianfixes ianfixes changed the title arduino_ci_remote.rb --testfile-select=GLOB shouldn't compile examples add --skip-compile and --skip-unittest options to arduino_ci_remote.rb Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci scripts The test runner scripts enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants