File tree 3 files changed +29
-2
lines changed 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,4 @@ script:
13
13
- bundle exec rubocop --version
14
14
- bundle exec rubocop -D .
15
15
- 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|
14
14
spec . description = spec . description
15
15
spec . homepage = "http://github.com/ifreecarve/arduino_ci"
16
16
17
- spec . files = [ 'README.md' , '.yardopts' ] + Dir [ 'lib/**/*.*' ] . reject { |f | f . match ( %r{^(test|spec|features)/} ) }
18
-
19
17
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
+
20
23
spec . executables = spec . files . grep ( %r{^exe/} ) { |f | File . basename ( f ) }
21
24
spec . require_paths = [ "lib" ]
22
25
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