@@ -493,7 +493,14 @@ def perform_example_compilation_tests(cpp_library, config)
493
493
puts
494
494
inform ( "Discovered example sketch" ) { example_name }
495
495
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
+
497
504
platforms = choose_platform_set ( ovr_config , "library example" , ovr_config . platforms_to_build , cpp_library . library_properties )
498
505
499
506
# having no platforms defined is probably an error
@@ -541,7 +548,15 @@ def perform_example_compilation_tests(cpp_library, config)
541
548
inform ( "Working directory" ) { Dir . pwd }
542
549
543
550
# 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
+
545
560
@backend = ArduinoCI ::ArduinoInstallation . autolocate!
546
561
inform ( "Located arduino-cli binary" ) { @backend . binary_path . to_s }
547
562
if @backend . lib_dir . exist?
0 commit comments