Skip to content

Commit 8d194a8

Browse files
committed
do unit tests first
1 parent ae213dd commit 8d194a8

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010

1111
### Changed
1212
- `arduino_ci_remote.rb` doesn't attempt to set URLs if nothing needs to be downloaded
13+
- `arduino_ci_remote.rb` does unit tests first
1314

1415
### Deprecated
1516

exe/arduino_ci_remote.rb

+20-20
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,6 @@ def assure(message, &block)
8888
assure("Installing aux library '#{l}'") { @arduino_cmd.install_library(l) }
8989
end
9090

91-
attempt("Setting compiler warning level") { @arduino_cmd.set_pref("compiler.warning_level", "all") }
92-
93-
library_examples.each do |example_path|
94-
ovr_config = config.from_example(example_path)
95-
ovr_config.platforms_to_build.each do |p|
96-
board = all_platforms[p][:board]
97-
assure("Switching to board for #{p} (#{board})") { @arduino_cmd.use_board(board) }
98-
example_name = File.basename(example_path)
99-
attempt("Verifying #{example_name}") do
100-
ret = @arduino_cmd.verify_sketch(example_path)
101-
unless ret
102-
puts
103-
puts "Last command: #{@arduino_cmd.last_msg}"
104-
puts @arduino_cmd.last_err
105-
end
106-
ret
107-
end
108-
end
109-
end
110-
11191
config.platforms_to_unittest.each do |p|
11292
board = all_platforms[p][:board]
11393
assure("Switching to board for #{p} (#{board})") { @arduino_cmd.use_board(board) }
@@ -131,4 +111,24 @@ def assure(message, &block)
131111
end
132112
end
133113

114+
attempt("Setting compiler warning level") { @arduino_cmd.set_pref("compiler.warning_level", "all") }
115+
116+
library_examples.each do |example_path|
117+
ovr_config = config.from_example(example_path)
118+
ovr_config.platforms_to_build.each do |p|
119+
board = all_platforms[p][:board]
120+
assure("Switching to board for #{p} (#{board})") { @arduino_cmd.use_board(board) }
121+
example_name = File.basename(example_path)
122+
attempt("Verifying #{example_name}") do
123+
ret = @arduino_cmd.verify_sketch(example_path)
124+
unless ret
125+
puts
126+
puts "Last command: #{@arduino_cmd.last_msg}"
127+
puts @arduino_cmd.last_err
128+
end
129+
ret
130+
end
131+
end
132+
end
133+
134134
terminate(true)

0 commit comments

Comments
 (0)