Skip to content

Commit c161c3d

Browse files
committed
Explicitly report config overrides and their paths
1 parent dcd7553 commit c161c3d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
- C++ definitions of `ARDUINO_CI_COMPILATION_MOCKS` and `ARDUINO_CI_GODMODE` to aid in compilation macros
1111
- `CIConfig.available_override_config_path()` to search for available override files in standard locations
1212
- `CIConfig.override_file_from_project_library` and `CIConfig.override_file_from_example` to expose config locations
13+
- CI runner script now expliclty informs about config overrides
1314

1415
### Changed
1516
- `CIConfig` now uses `Pathname` instead of strings

Diff for: exe/arduino_ci.rb

+17-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,14 @@ def perform_example_compilation_tests(cpp_library, config)
493493
puts
494494
inform("Discovered example sketch") { example_name }
495495

496-
ovr_config = config.from_example(example_path)
496+
example_config_file = config.override_file_from_example(example_path)
497+
ovr_config = if example_config_file.nil?
498+
config
499+
else
500+
inform("Using configuration override from example") { example_config_file }
501+
config.from_example(example_path)
502+
end
503+
497504
platforms = choose_platform_set(ovr_config, "library example", ovr_config.platforms_to_build, cpp_library.library_properties)
498505

499506
# having no platforms defined is probably an error
@@ -541,7 +548,15 @@ def perform_example_compilation_tests(cpp_library, config)
541548
inform("Working directory") { Dir.pwd }
542549

543550
# initialize command and config
544-
config = ArduinoCI::CIConfig.default.from_project_library
551+
default_config = ArduinoCI::CIConfig.default
552+
library_config_file = default_config.override_file_from_project_library
553+
config = if library_config_file.nil?
554+
default_config
555+
else
556+
inform("Using configuration override from project") { library_config_file }
557+
default_config.from_project_library
558+
end
559+
545560
@backend = ArduinoCI::ArduinoInstallation.autolocate!
546561
inform("Located arduino-cli binary") { @backend.binary_path.to_s }
547562
if @backend.lib_dir.exist?

0 commit comments

Comments
 (0)