Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false positive result where test passed even though gcc failed with error #342

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Fix missing `LED_BUILTIN` definition for Arduino Due, Zero and Circuit Playground.
- No longer ignore failures if the first step of compiling files for the
unit test fails.

### Security

Expand Down
4 changes: 3 additions & 1 deletion exe/arduino_ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,9 @@ def perform_unit_tests(cpp_library, file_config)
puts
compilers.each do |gcc_binary|
# before compiling the tests, build a shared library of everything except the test code
next unless build_shared_library(gcc_binary, p, config, cpp_library)
build_result = build_shared_library(gcc_binary, p, config, cpp_library)
@failure_count += 1 unless build_result
next unless build_result

# now build and run each test using the shared library build above
config.allowable_unittest_files(cpp_library.test_files).each do |unittest_path|
Expand Down
4 changes: 2 additions & 2 deletions lib/arduino_ci/cpp_library.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ def all_arduino_library_dependencies!(additional_libraries = [])
recursive = (additional_libraries + arduino_library_dependencies).map do |n|
other_lib = self.class.new(n, @backend)
other_lib.install unless other_lib.installed?
other_lib.all_arduino_library_dependencies!
[n] + other_lib.all_arduino_library_dependencies!
end.flatten
(additional_libraries + recursive).uniq
recursive.uniq
end
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a test case or some performance metric that relates to this change? Just trying to figure out whether this is an improved implementation or a bugfix


# Arduino library directories containing sources -- only those of the dependencies
Expand Down