@@ -499,9 +499,11 @@ func compileWithExportBinariesConfig(t *testing.T, env *integrationtest.Environm
499
499
require .NoError (t , err )
500
500
requirejson .Contains (t , stdout , `
501
501
{
502
- "sketch": {
503
- "always_export_binaries": "true"
504
- }
502
+ "config": {
503
+ "sketch": {
504
+ "always_export_binaries": "true"
505
+ }
506
+ }
505
507
}` )
506
508
507
509
// Test compilation with export binaries env var set
@@ -824,10 +826,8 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) {
824
826
825
827
stdout , _ , err := cli .Run ("lib" , "examples" , "ArduinoIoTCloud" , "--format" , "json" , "--config-file" , "arduino-cli.yaml" )
826
828
require .NoError (t , err )
827
- var libOutput []map [string ]interface {}
828
- err = json .Unmarshal (stdout , & libOutput )
829
- require .NoError (t , err )
830
- sketchPath := paths .New (libOutput [0 ]["library" ].(map [string ]interface {})["install_dir" ].(string ))
829
+ libOutput := strings .Trim (requirejson .Parse (t , stdout ).Query (`.examples.[0].library.install_dir` ).String (), `"` )
830
+ sketchPath := paths .New (libOutput )
831
831
sketchPath = sketchPath .Join ("examples" , "ArduinoIoTCloud-Advanced" )
832
832
833
833
_ , _ , err = cli .Run ("compile" , "-b" , "esp8266:esp8266:huzzah" , sketchPath .String (), "--config-file" , "arduino-cli.yaml" )
0 commit comments