@@ -258,3 +258,57 @@ func TestCompileBlacklistedSketchname(t *testing.T) {
258
258
_ , _ , err = cli .Run ("compile" , "-b" , fqbn , sketchPath .String ())
259
259
require .NoError (t , err )
260
260
}
261
+
262
+ func TestCompileWithoutPrecompiledLibraries (t * testing.T ) {
263
+ env , cli := integrationtest .CreateArduinoCLIWithEnvironment (t )
264
+ defer env .CleanUp ()
265
+
266
+ // Init the environment explicitly
267
+ url := "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json"
268
+ _ , _ , err := cli .Run ("core" , "update-index" , "--additional-urls=" + url )
269
+ require .NoError (t , err )
270
+ _ ,
_ ,
err = cli .
Run (
"core" ,
"install" ,
"arduino:[email protected] " ,
"--additional-urls=" + url )
271
+ require .NoError (t , err )
272
+
273
+ // // Precompiled version of Arduino_TensorflowLite
274
+ // _, _, err = cli.Run("lib", "install", "Arduino_LSM9DS1")
275
+ // require.NoError(t, err)
276
+ // _, _, err = cli.Run("lib", "install", "[email protected] ")
277
+ // require.NoError(t, err)
278
+
279
+ // sketchPath := cli.SketchbookDir().Join("libraries", "Arduino_TensorFlowLite", "examples", "hello_world")
280
+ // _, _, err = cli.Run("compile", "-b", "arduino:mbed:nano33ble", sketchPath.String())
281
+ // require.NoError(t, err)
282
+
283
+ _ ,
_ ,
err = cli .
Run (
"core" ,
"install" ,
"arduino:[email protected] " ,
"--additional-urls=" + url )
284
+ require .NoError (t , err )
285
+ // _, _, err = cli.Run("core", "install", "adafruit:[email protected] ", "--additional-urls="+url)
286
+ // require.NoError(t, err)
287
+ // // should work on adafruit too after https://github.com/arduino/arduino-cli/pull/1134
288
+ // _, _, err = cli.Run("compile", "-b", "adafruit:samd:adafruit_feather_m4", sketchPath.String())
289
+ // require.NoError(t, err)
290
+
291
+ // // Non-precompiled version of Arduino_TensorflowLite
292
+ // _, _, err = cli.Run("lib", "install", "[email protected] ")
293
+ // require.NoError(t, err)
294
+ // _, _, err = cli.Run("compile", "-b", "arduino:mbed:nano33ble", sketchPath.String())
295
+ // require.NoError(t, err)
296
+ // _, _, err = cli.Run("compile", "-b", "adafruit:samd:adafruit_feather_m4", sketchPath.String())
297
+ // require.NoError(t, err)
298
+
299
+ // Bosch sensor library
300
+ _ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"BSEC Software [email protected] " )
301
+ require .NoError (t , err )
302
+ sketchPath := cli .SketchbookDir ().Join ("libraries" , "BSEC_Software_Library" , "examples" , "basic" )
303
+ _ , _ , err = cli .Run ("compile" , "-b" , "arduino:samd:mkr1000" , sketchPath .String ())
304
+ require .NoError (t , err )
305
+ _ , _ , err = cli .Run ("compile" , "-b" , "arduino:mbed:nano33ble" , sketchPath .String ())
306
+ require .NoError (t , err )
307
+
308
+ // USBBlaster library
309
+ _ ,
_ ,
err = cli .
Run (
"lib" ,
"install" ,
"[email protected] " )
310
+ require .NoError (t , err )
311
+ sketchPath = cli .SketchbookDir ().Join ("libraries" , "USBBlaster" , "examples" , "USB_Blaster" )
312
+ _ , _ , err = cli .Run ("compile" , "-b" , "arduino:samd:mkrvidor4000" , sketchPath .String ())
313
+ require .NoError (t , err )
314
+ }
0 commit comments