@@ -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)
541548inform ( "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!
546561inform ( "Located arduino-cli binary" ) { @backend . binary_path . to_s }
547562if @backend . lib_dir . exist?
0 commit comments