Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed Nov 7, 2023
1 parent 0eeded3 commit 88f7058
Show file tree
Hide file tree
Showing 4 changed files with 236 additions and 218 deletions.
14 changes: 7 additions & 7 deletions internal/integrationtest/compile_1/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,11 @@ func compileWithExportBinariesConfig(t *testing.T, env *integrationtest.Environm
require.NoError(t, err)
requirejson.Contains(t, stdout, `
{
"sketch": {
"always_export_binaries": "true"
}
"config": {
"sketch": {
"always_export_binaries": "true"
}
}
}`)

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

stdout, _, err := cli.Run("lib", "examples", "ArduinoIoTCloud", "--format", "json", "--config-file", "arduino-cli.yaml")
require.NoError(t, err)
var libOutput []map[string]interface{}
err = json.Unmarshal(stdout, &libOutput)
require.NoError(t, err)
sketchPath := paths.New(libOutput[0]["library"].(map[string]interface{})["install_dir"].(string))
libOutput := strings.Trim(requirejson.Parse(t, stdout).Query(`.examples.[0].library.install_dir`).String(), `"`)
sketchPath := paths.New(libOutput)
sketchPath = sketchPath.Join("examples", "ArduinoIoTCloud-Advanced")

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

0 comments on commit 88f7058

Please sign in to comment.