From 5df7166b46b15b17baac73e743f800280fc9db5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20L=C3=B8vdal?= Date: Thu, 3 Feb 2022 19:26:51 +0100 Subject: [PATCH 1/2] Increment @failure_count if build_shared_library fails --- CHANGELOG.md | 2 ++ exe/arduino_ci.rb | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4f710a0..250818c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/exe/arduino_ci.rb b/exe/arduino_ci.rb index c73522dd..b9aed269 100755 --- a/exe/arduino_ci.rb +++ b/exe/arduino_ci.rb @@ -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| From f1395aa174e8ffdb68ea7c4fefa7124532657129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20L=C3=B8vdal?= Date: Tue, 8 Feb 2022 20:59:19 +0100 Subject: [PATCH 2/2] Fix recursion accumulation in all_arduino_library_dependencies --- lib/arduino_ci/cpp_library.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/arduino_ci/cpp_library.rb b/lib/arduino_ci/cpp_library.rb index 8ee111ea..5a3a8aa5 100644 --- a/lib/arduino_ci/cpp_library.rb +++ b/lib/arduino_ci/cpp_library.rb @@ -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 # Arduino library directories containing sources -- only those of the dependencies