Skip to content

Commit

Permalink
Add TestDebugProfile to integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoPologruto committed Jan 18, 2024
1 parent b6c939b commit d8cdd5d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
19 changes: 19 additions & 0 deletions internal/integrationtest/debug/debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,22 @@ func testDebugCheck(t *testing.T, env *integrationtest.Environment, cli *integra
require.NoError(t, err)
requirejson.Contains(t, out, `{ "debugging_supported" : true, "debug_fqbn" : "my:samd:my6" }`)
}

func TestDebugProfile(t *testing.T) {
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
defer env.CleanUp()

// Init the environment explicitly
_, _, err := cli.Run("core", "update-index")
require.NoError(t, err)

sketchPath := cli.CopySketch("sketch_with_profile")

// Compile the sketch using the profile
_, _, err = cli.Run("compile", "--profile", "samd", sketchPath.String())
require.NoError(t, err)

// Debug using the profile
_, _, err = cli.Run("debug", "--profile", "samd", sketchPath.String(), "--info")
require.NoError(t, err)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ profiles:

avr2:
fqbn: arduino:avr:uno
programmer: atmel_ice
platforms:
- platform: arduino:avr (1.8.5)
libraries:
- Arduino_JSON (0.1.0)

samd:
fqbn: arduino:samd:mkr1000
programmer: atmel_ice
platforms:
- platform: arduino:samd (1.8.13)
libraries:
- Arduino_JSON (0.1.0)

0 comments on commit d8cdd5d

Please sign in to comment.