Skip to content

Commit f4aeca4

Browse files
fix tests
1 parent 0eeded3 commit f4aeca4

File tree

4 files changed

+236
-218
lines changed

4 files changed

+236
-218
lines changed

Diff for: internal/integrationtest/compile_1/compile_test.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,11 @@ func compileWithExportBinariesConfig(t *testing.T, env *integrationtest.Environm
499499
require.NoError(t, err)
500500
requirejson.Contains(t, stdout, `
501501
{
502-
"sketch": {
503-
"always_export_binaries": "true"
504-
}
502+
"config": {
503+
"sketch": {
504+
"always_export_binaries": "true"
505+
}
506+
}
505507
}`)
506508

507509
// Test compilation with export binaries env var set
@@ -824,10 +826,8 @@ func TestCompileWithArchivesAndLongPaths(t *testing.T) {
824826

825827
stdout, _, err := cli.Run("lib", "examples", "ArduinoIoTCloud", "--format", "json", "--config-file", "arduino-cli.yaml")
826828
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)
831831
sketchPath = sketchPath.Join("examples", "ArduinoIoTCloud-Advanced")
832832

833833
_, _, err = cli.Run("compile", "-b", "esp8266:esp8266:huzzah", sketchPath.String(), "--config-file", "arduino-cli.yaml")

0 commit comments

Comments
 (0)