@@ -594,3 +594,42 @@ def test_compile_with_custom_libraries(run_command, copy_sketch):
594594 # This compile command has been taken from this issue:
595595 # https://github.com/arduino/arduino-cli/issues/973
596596 assert run_command (f"compile --libraries { first_lib } ,{ second_lib } -b { fqbn } { sketch_path } " )
597+
598+
599+ def test_compile_with_precompiled_library (run_command , data_dir ):
600+ assert run_command ("update" )
601+
602+ assert run_command (
"core install arduino:[email protected] " )
603+ fqbn = "arduino:samd:mkrzero"
604+
605+ # Install precompiled library
606+ # For more information see:
607+ # https://arduino.github.io/arduino-cli/latest/library-specification/#precompiled-binaries
608+ assert run_command (
'lib install "BSEC Software [email protected] "' )
609+ sketch_folder = Path (data_dir , "libraries" , "BSEC_Software_Library" , "examples" , "basic" )
610+
611+ # Compile and verify dependencies detection for fully precompiled library is not skipped
612+ result = run_command (f"compile -b { fqbn } { sketch_folder } -v" )
613+ assert result .ok
614+ assert "Skipping dependencies detection for precompiled library BSEC Software Library" not in result .stdout
615+
616+
617+ def test_compile_with_fully_precompiled_library (run_command , data_dir ):
618+ assert run_command ("update" )
619+
620+ assert run_command (
"core install arduino:[email protected] " )
621+ fqbn = "arduino:mbed:nano33ble"
622+
623+ # Install fully precompiled library
624+ # For more information see:
625+ # https://arduino.github.io/arduino-cli/latest/library-specification/#precompiled-binaries
626+ assert run_command (
"lib install [email protected] " )
627+ sketch_folder = Path (data_dir , "libraries" , "Arduino_TensorFlowLite" , "examples" , "hello_world" )
628+
629+ # Install example dependency
630+ # assert run_command("lib install Arduino_LSM9DS1")
631+
632+ # Compile and verify dependencies detection for fully precompiled library is skipped
633+ result = run_command (f"compile -b { fqbn } { sketch_folder } -v" )
634+ assert result .ok
635+ assert "Skipping dependencies detection for precompiled library Arduino_TensorFlowLite" in result .stdout
0 commit comments