File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ script:
1313 - bundle exec rubocop --version
1414 - bundle exec rubocop -D .
1515 - bundle exec rspec
16+ - bundle exec ci_system_check.rb
Original file line number Diff line number Diff line change @@ -14,9 +14,12 @@ Gem::Specification.new do |spec|
1414 spec . description = spec . description
1515 spec . homepage = "http://github.com/ifreecarve/arduino_ci"
1616
17- spec . files = [ 'README.md' , '.yardopts' ] + Dir [ 'lib/**/*.*' ] . reject { |f | f . match ( %r{^(test|spec|features)/} ) }
18-
1917 spec . bindir = "exe"
18+ rejection_regex = %r{^(test|spec|features)/}
19+ libfiles = Dir [ 'lib/**/*.*' ] . reject { |f | f . match ( rejection_regex ) }
20+ binfiles = Dir [ File . join ( spec . bindir , '/**/*.*' ) ] . reject { |f | f . match ( rejection_regex ) }
21+ spec . files = [ 'README.md' , '.yardopts' ] + libfiles + binfiles
22+
2023 spec . executables = spec . files . grep ( %r{^exe/} ) { |f | File . basename ( f ) }
2124 spec . require_paths = [ "lib" ]
2225
Original file line number Diff line number Diff line change 1+ require 'arduino_ci'
2+
3+ puts "Enabling display with display manager"
4+ ArduinoCI ::DisplayManager ::instance . enable
5+
6+ puts "Autlocating Arduino command"
7+ arduino_cmd = ArduinoCI ::ArduinoCmd . autolocate!
8+
9+ board_tests = {
10+ "arduino:avr:uno" => true ,
11+ "eggs:milk:wheat" => false ,
12+ }
13+
14+ got_problem = false
15+ board_tests . each do |k , v |
16+ puts "I expect arduino_cmd.board_installed?(#{ k } ) to be #{ v } "
17+ result = arduino_cmd . board_installed? ( k )
18+ puts " board_installed?(#{ k } ) returns #{ result } . expected #{ v } "
19+ got_problem = true if v != result
20+ end
21+
22+ abort if got_problem
23+ exit ( 0 )
You can’t perform that action at this time.
0 commit comments