Skip to content

Commit 899ed76

Browse files
committed
avoid problems related to finding a symbolic link
1 parent 04fa574 commit 899ed76

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/arduino_ci/cpp_library.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ def initialize(base_dir)
2727
end
2828

2929
def cpp_files_in(some_dir)
30-
Find.find(some_dir).select { |path| CPP_EXTENSIONS.include?(File.extname(path)) }
30+
real = File.realpath(some_dir)
31+
Find.find(real).select { |path| CPP_EXTENSIONS.include?(File.extname(path)) }
3132
end
3233

3334
# CPP files that are part of the project library under test
3435
def cpp_files
35-
cpp_files_in(@base_dir).reject { |p| p.start_with?(tests_dir + File::SEPARATOR) }
36+
cpp_files_in(@base_dir).reject { |p| File.dirname(p).include?(tests_dir) }
3637
end
3738

3839
# CPP files that are part of the arduino mock library we're providing

0 commit comments

Comments
 (0)