@@ -193,6 +193,13 @@ def assured_platform(purpose, name, config)
193
193
platform_definition
194
194
end
195
195
196
+ def inform_override ( from_where , &block )
197
+ inform ( "Using configuration override from #{ from_where } " ) do
198
+ file = block . call ( )
199
+ file . nil? ? "<none>" : file
200
+ end
201
+ end
202
+
196
203
# Return true if the file (or one of the dirs containing it) is hidden
197
204
def file_is_hidden_somewhere? ( path )
198
205
# this is clunkly but pre-2.2-ish ruby doesn't return ascend as an enumerator
@@ -493,7 +500,9 @@ def perform_example_compilation_tests(cpp_library, config)
493
500
puts
494
501
inform ( "Discovered example sketch" ) { example_name }
495
502
496
- ovr_config = config . from_example ( example_path )
503
+ inform_override ( "example" ) { ex_config . override_file_from_example ( example_path ) }
504
+ ovr_config = ex_config . from_example ( example_path )
505
+
497
506
platforms = choose_platform_set ( ovr_config , "library example" , ovr_config . platforms_to_build , cpp_library . library_properties )
498
507
499
508
# having no platforms defined is probably an error
@@ -541,7 +550,10 @@ def perform_example_compilation_tests(cpp_library, config)
541
550
inform ( "Working directory" ) { Dir . pwd }
542
551
543
552
# initialize command and config
544
- config = ArduinoCI ::CIConfig . default . from_project_library
553
+ default_config = ArduinoCI ::CIConfig . default
554
+ inform_override ( "project" ) { default_config . override_file_from_project_library }
555
+ config = default_config . from_project_library
556
+
545
557
@backend = ArduinoCI ::ArduinoInstallation . autolocate!
546
558
inform ( "Located arduino-cli binary" ) { @backend . binary_path . to_s }
547
559
if @backend . lib_dir . exist?
0 commit comments