@@ -68,11 +68,11 @@ def self.parse(options)
6868def terminate ( final = nil )
6969 puts "Failures: #{ @failure_count } "
7070 unless @failure_count . zero? || final
71- puts "Last message: #{ @arduino_cmd . last_msg } "
71+ puts "Last message: #{ @arduino_backend . last_msg } "
7272 puts "========== Stdout:"
73- puts @arduino_cmd . last_out
73+ puts @arduino_backend . last_out
7474 puts "========== Stderr:"
75- puts @arduino_cmd . last_err
75+ puts @arduino_backend . last_err
7676 end
7777 retcode = @failure_count . zero? ? 0 : 1
7878 exit ( retcode )
@@ -174,10 +174,10 @@ def display_files(pathname)
174174
175175def install_arduino_library_dependencies ( aux_libraries )
176176 aux_libraries . each do |l |
177- if @arduino_cmd . library_present? ( l )
177+ if @arduino_backend . library_present? ( l )
178178 inform ( "Using pre-existing library" ) { l . to_s }
179179 else
180- assure ( "Installing aux library '#{ l } '" ) { @arduino_cmd . install_library ( l ) }
180+ assure ( "Installing aux library '#{ l } '" ) { @arduino_backend . install_library ( l ) }
181181 end
182182 end
183183end
@@ -189,7 +189,7 @@ def perform_unit_tests(file_config)
189189 end
190190 config = file_config . with_override_config ( @cli_options [ :ci_config ] )
191191 cpp_library = ArduinoCI ::CppLibrary . new ( Pathname . new ( "." ) ,
192- @arduino_cmd . lib_dir ,
192+ @arduino_backend . lib_dir ,
193193 config . exclude_dirs . map ( &Pathname . method ( :new ) ) )
194194
195195 # check GCC
@@ -264,18 +264,18 @@ def perform_compilation_tests(config)
264264
265265 # initialize library under test
266266 installed_library_path = attempt ( "Installing library under test" ) do
267- @arduino_cmd . install_local_library ( Pathname . new ( "." ) )
267+ @arduino_backend . install_local_library ( Pathname . new ( "." ) )
268268 end
269269
270270 if !installed_library_path . nil? && installed_library_path . exist?
271271 inform ( "Library installed at" ) { installed_library_path . to_s }
272272 else
273273 assure_multiline ( "Library installed successfully" ) do
274274 if installed_library_path . nil?
275- puts @arduino_cmd . last_msg
275+ puts @arduino_backend . last_msg
276276 else
277277 # print out the contents of the deepest directory we actually find
278- @arduino_cmd . lib_dir . ascend do |path_part |
278+ @arduino_backend . lib_dir . ascend do |path_part |
279279 next unless path_part . exist?
280280
281281 break display_files ( path_part )
@@ -284,7 +284,7 @@ def perform_compilation_tests(config)
284284 end
285285 end
286286 end
287- library_examples = @arduino_cmd . library_examples ( installed_library_path )
287+ library_examples = @arduino_backend . library_examples ( installed_library_path )
288288
289289 # gather up all required boards for compilation so we can install them up front.
290290 # start with the "platforms to unittest" and add the examples
@@ -330,13 +330,13 @@ def perform_compilation_tests(config)
330330
331331 unless all_urls . empty?
332332 assure ( "Setting board manager URLs" ) do
333- @arduino_cmd . board_manager_urls = all_urls
333+ @arduino_backend . board_manager_urls = all_urls
334334 end
335335 end
336336
337337 all_packages . each do |p |
338338 assure ( "Installing board package #{ p } " ) do
339- @arduino_cmd . install_boards ( p )
339+ @arduino_backend . install_boards ( p )
340340 end
341341 end
342342
@@ -367,11 +367,11 @@ def perform_compilation_tests(config)
367367 example_paths . each do |example_path |
368368 example_name = File . basename ( example_path )
369369 attempt ( "Compiling #{ example_name } for #{ board } " ) do
370- ret = @arduino_cmd . compile_sketch ( example_path , board )
370+ ret = @arduino_backend . compile_sketch ( example_path , board )
371371 unless ret
372372 puts
373- puts "Last command: #{ @arduino_cmd . last_msg } "
374- puts @arduino_cmd . last_err
373+ puts "Last command: #{ @arduino_backend . last_msg } "
374+ puts @arduino_backend . last_err
375375 end
376376 ret
377377 end
@@ -383,8 +383,8 @@ def perform_compilation_tests(config)
383383# initialize command and config
384384config = ArduinoCI ::CIConfig . default . from_project_library
385385
386- @arduino_cmd = ArduinoCI ::ArduinoInstallation . autolocate!
387- inform ( "Located arduino-cli binary" ) { @arduino_cmd . binary_path . to_s }
386+ @arduino_backend = ArduinoCI ::ArduinoInstallation . autolocate!
387+ inform ( "Located arduino-cli binary" ) { @arduino_backend . binary_path . to_s }
388388
389389perform_unit_tests ( config )
390390perform_compilation_tests ( config )
0 commit comments