@@ -193,6 +193,13 @@ def assured_platform(purpose, name, config)
193193 platform_definition
194194end
195195
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+
196203# Return true if the file (or one of the dirs containing it) is hidden
197204def file_is_hidden_somewhere? ( path )
198205 # 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)
493500 puts
494501 inform ( "Discovered example sketch" ) { example_name }
495502
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+
497506 platforms = choose_platform_set ( ovr_config , "library example" , ovr_config . platforms_to_build , cpp_library . library_properties )
498507
499508 # having no platforms defined is probably an error
@@ -541,7 +550,10 @@ def perform_example_compilation_tests(cpp_library, config)
541550inform ( "Working directory" ) { Dir . pwd }
542551
543552# 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+
545557@backend = ArduinoCI ::ArduinoInstallation . autolocate!
546558inform ( "Located arduino-cli binary" ) { @backend . binary_path . to_s }
547559if @backend . lib_dir . exist?
0 commit comments