Skip to content

Commit 13bc7a1

Browse files
committed
Install dependencies before unit testing
1 parent b8ce10c commit 13bc7a1

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1717
### Removed
1818

1919
### Fixed
20+
- Arduino library dependencies are now installed prior to unit testing, instead of prior to compilation testing. Whoops.
2021

2122
### Security
2223

exe/arduino_ci_remote.rb

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,16 @@ def display_files(pathname)
167167
non_hidden.each { |p| puts "#{margin}#{p}" }
168168
end
169169

170+
def install_arduino_library_dependencies(aux_libraries)
171+
aux_libraries.each do |l|
172+
if @arduino_cmd.library_present?(l)
173+
inform("Using pre-existing library") { l.to_s }
174+
else
175+
assure("Installing aux library '#{l}'") { @arduino_cmd.install_library(l) }
176+
end
177+
end
178+
end
179+
170180
def perform_unit_tests(file_config)
171181
if @cli_options[:skip_unittests]
172182
inform("Skipping unit tests") { "as requested via command line" }
@@ -209,6 +219,8 @@ def perform_unit_tests(file_config)
209219
elsif config.platforms_to_unittest.empty?
210220
inform("Skipping unit tests") { "no platforms were requested" }
211221
else
222+
install_arduino_library_dependencies(config.aux_libraries_for_unittest)
223+
212224
config.platforms_to_unittest.each do |p|
213225
config.allowable_unittest_files(cpp_library.test_files).each do |unittest_path|
214226
unittest_name = unittest_path.basename.to_s
@@ -273,7 +285,7 @@ def perform_compilation_tests(config)
273285
# while we're doing that, get the aux libraries as well
274286
example_platform_info = {}
275287
board_package_url = {}
276-
aux_libraries = Set.new(config.aux_libraries_for_unittest + config.aux_libraries_for_build)
288+
aux_libraries = Set.new(config.aux_libraries_for_build)
277289
# while collecting the platforms, ensure they're defined
278290

279291
library_examples.each do |path|
@@ -322,13 +334,7 @@ def perform_compilation_tests(config)
322334
end
323335
end
324336

325-
aux_libraries.each do |l|
326-
if @arduino_cmd.library_present?(l)
327-
inform("Using pre-existing library") { l.to_s }
328-
else
329-
assure("Installing aux library '#{l}'") { @arduino_cmd.install_library(l) }
330-
end
331-
end
337+
install_arduino_library_dependencies(aux_libraries)
332338

333339
last_board = nil
334340
if config.platforms_to_build.empty?

0 commit comments

Comments
 (0)