From d8cdd5df82eecfe025983b2572a58f1cf2fc597e Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Wed, 17 Jan 2024 15:58:29 +0100 Subject: [PATCH] Add TestDebugProfile to integration tests --- internal/integrationtest/debug/debug_test.go | 19 +++++++++++++++++++ .../testdata/sketch_with_profile/sketch.yaml | 9 +++++++++ 2 files changed, 28 insertions(+) diff --git a/internal/integrationtest/debug/debug_test.go b/internal/integrationtest/debug/debug_test.go index 12d4c514e78..096fb6e7717 100644 --- a/internal/integrationtest/debug/debug_test.go +++ b/internal/integrationtest/debug/debug_test.go @@ -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) +} diff --git a/internal/integrationtest/testdata/sketch_with_profile/sketch.yaml b/internal/integrationtest/testdata/sketch_with_profile/sketch.yaml index ed40ce874f3..bc177c5023a 100644 --- a/internal/integrationtest/testdata/sketch_with_profile/sketch.yaml +++ b/internal/integrationtest/testdata/sketch_with_profile/sketch.yaml @@ -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)