Skip to content

Commit b4c6049

Browse files
Migrate TestCompileAndUploadToPortWithBoardAutodetect to upload_test.go and delete test_upload.py
1 parent a6d02ee commit b4c6049

File tree

2 files changed

+26
-59
lines changed

2 files changed

+26
-59
lines changed

Diff for: internal/integrationtest/upload/upload_test.go

+26
Original file line numberDiff line numberDiff line change
@@ -554,3 +554,29 @@ func TestUploadToPortWithBoardAutodetect(t *testing.T) {
554554
require.NoError(t, err)
555555
}
556556
}
557+
558+
func TestCompileAndUploadToPortWithBoardAutodetect(t *testing.T) {
559+
if os.Getenv("CI") != "" {
560+
t.Skip("VMs have no serial ports")
561+
}
562+
563+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
564+
defer env.CleanUp()
565+
566+
_, _, err := cli.Run("update")
567+
require.NoError(t, err)
568+
569+
// Create a sketch
570+
sketchPath := cli.SketchbookDir().Join("SketchSimple")
571+
_, _, err = cli.Run("sketch", "new", sketchPath.String())
572+
require.NoError(t, err)
573+
574+
for _, board := range detectedBoards(t, cli) {
575+
// Install core
576+
_, _, err = cli.Run("core", "install", board.core)
577+
require.NoError(t, err)
578+
579+
_, _, err = cli.Run("compile", "-u", "-p", board.address, sketchPath.String())
580+
require.NoError(t, err)
581+
}
582+
}

Diff for: test/test_upload.py

-59
This file was deleted.

0 commit comments

Comments
 (0)