Skip to content

Commit 6331a94

Browse files
committed
more reliably generate paths to examples
1 parent 76e70f4 commit 6331a94

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

exe/ci_system_check.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@
4949
puts "verify a simple sketch"
5050
got_problem = true unless arduino_cmd.verify_sketch(simple_sketch)
5151

52-
puts "verify the examples of a library..."
53-
puts " - Install the library"
5452
library_path = File.join(File.dirname(File.dirname(__FILE__)), "SampleProjects", "DoSomething")
53+
puts "verify the examples of a library (#{library_path})..."
54+
puts " - Install the library"
5555
installed_library_path = arduino_cmd.install_local_library(library_path)
5656
got_problem = true if installed_library_path.nil?
5757
puts " - Iterate over the examples"

lib/arduino_ci/arduino_cmd.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def install_local_library(library_path)
230230

231231
def each_library_example(installed_library_path)
232232
example_path = File.join(installed_library_path, "examples")
233-
examples = Pathname.new(example_path).children.select(&:directory?).map(&:to_path).reject { |n| n[0] == '.' }
233+
examples = Pathname.new(example_path).children.select(&:directory?).map(&:to_path).map(&File.method(:basename))
234234
examples.each do |e|
235235
proj_file = File.join(example_path, e, "#{e}.ino")
236236
puts "Considering #{proj_file}"

0 commit comments

Comments
 (0)