@@ -590,3 +590,42 @@ def test_compile_with_archives_and_long_paths(run_command):
590
590
sketch_path = Path (lib_output [0 ]["library" ]["install_dir" ], "examples" , "ArduinoIoTCloud-Advanced" )
591
591
592
592
assert run_command (f"compile -b esp8266:esp8266:huzzah { sketch_path } " )
593
+
594
+
595
+ def test_compile_with_precompiled_library (run_command , data_dir ):
596
+ assert run_command ("update" )
597
+
598
+ assert run_command (
"core install arduino:[email protected] " )
599
+ fqbn = "arduino:samd:mkrzero"
600
+
601
+ # Install precompiled library
602
+ # For more information see:
603
+ # https://arduino.github.io/arduino-cli/latest/library-specification/#precompiled-binaries
604
+ assert run_command (
'lib install "BSEC Software [email protected] "' )
605
+ sketch_folder = Path (data_dir , "libraries" , "BSEC_Software_Library" , "examples" , "basic" )
606
+
607
+ # Compile and verify dependencies detection for fully precompiled library is not skipped
608
+ result = run_command (f"compile -b { fqbn } { sketch_folder } -v" )
609
+ assert result .ok
610
+ assert "Skipping dependencies detection for precompiled library BSEC Software Library" not in result .stdout
611
+
612
+
613
+ def test_compile_with_fully_precompiled_library (run_command , data_dir ):
614
+ assert run_command ("update" )
615
+
616
+ assert run_command (
"core install arduino:[email protected] " )
617
+ fqbn = "arduino:mbed:nano33ble"
618
+
619
+ # Install fully precompiled library
620
+ # For more information see:
621
+ # https://arduino.github.io/arduino-cli/latest/library-specification/#precompiled-binaries
622
+ assert run_command (
"lib install [email protected] " )
623
+ sketch_folder = Path (data_dir , "libraries" , "Arduino_TensorFlowLite" , "examples" , "hello_world" )
624
+
625
+ # Install example dependency
626
+ # assert run_command("lib install Arduino_LSM9DS1")
627
+
628
+ # Compile and verify dependencies detection for fully precompiled library is skipped
629
+ result = run_command (f"compile -b { fqbn } { sketch_folder } -v" )
630
+ assert result .ok
631
+ assert "Skipping dependencies detection for precompiled library Arduino_TensorFlowLite" in result .stdout
0 commit comments