Skip to content

Commit 1640dbb

Browse files
committed
report path of Arduino binary
1 parent 49085c7 commit 1640dbb

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88
### Added
99
- Arduino command wrapper now natively supports board manager URLs
1010
- CI checks for proper board manager URLs for requested platforms
11+
- CI reports on Arduino executable location
1112

1213
### Changed
1314
- Centralized file listing code in `arduino_ci_remote.rb`

exe/arduino_ci_remote.rb

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def display_files(pathname)
103103
# initialize command and config
104104
config = ArduinoCI::CIConfig.default.from_project_library
105105
@arduino_cmd = ArduinoCI::ArduinoInstallation.autolocate!
106+
inform("Located Arduino binary") { @arduino_cmd.binary_path.to_s }
106107

107108
# initialize library under test
108109
installed_library_path = attempt("Installing library under test") do

lib/arduino_ci/arduino_cmd.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ def self.flag(name, text = nil)
1818
self.class_eval("def flag_#{name};\"#{text}\";end", __FILE__, __LINE__)
1919
end
2020

21-
# the path to the Arduino executable
22-
# @return [String]
21+
# the array of command components to launch the Arduino executable
22+
# @return [Array<String>]
2323
attr_accessor :base_cmd
2424

25+
# the actual path to the executable on this platform
26+
# @return [Pathname]
27+
attr_accessor :binary_path
28+
2529
# part of a workaround for https://github.com/arduino/Arduino/issues/3535
2630
attr_reader :library_is_indexed
2731

lib/arduino_ci/arduino_installation.rb

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
require 'pathname'
12
require "arduino_ci/host"
23
require "arduino_ci/arduino_cmd_osx"
34
require "arduino_ci/arduino_cmd_linux"
@@ -32,12 +33,14 @@ def autolocate
3233

3334
ret = ArduinoCmdLinux.new
3435
ret.base_cmd = [loc]
36+
ret.binary_path = Pathname.new(loc)
3537
when :windows then
3638
loc = ArduinoDownloaderWindows.autolocated_executable
3739
return nil if loc.nil?
3840

3941
ret = ArduinoCmdWindows.new
4042
ret.base_cmd = [loc]
43+
ret.binary_path = Pathname.new(loc)
4144
end
4245
ret
4346
end
@@ -77,6 +80,7 @@ def autolocate_osx
7780
result = Host.run_and_capture(*args)
7881
if result[:err].include? "Error: unknown option: --bogus-option"
7982
ret.base_cmd = launcher
83+
ret.binary_path = Pathname.new(osx_root)
8084
return ret
8185
end
8286
end

0 commit comments

Comments
 (0)