Skip to content

Commit 5954a05

Browse files
committed
Fixed integration test
1 parent af7beee commit 5954a05

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -734,13 +734,11 @@ func compileUsingBoardsLocalTxt(t *testing.T, env *integrationtest.Environment,
734734
// Verifies compilation fails because board doesn't exist
735735
_, stderr, err := cli.Run("compile", "--clean", "-b", fqbn, sketchPath.String())
736736
require.Error(t, err)
737-
require.Contains(t, string(stderr), "Error during build: Error resolving FQBN: board arduino:avr:nessuno not found")
737+
require.Contains(t, string(stderr), "Error during build: Invalid FQBN: board arduino:avr:nessuno not found")
738738

739739
// Use custom boards.local.txt with made arduino:avr:nessuno board
740740
boardsLocalTxt := cli.DataDir().Join("packages", "arduino", "hardware", "avr", "1.8.5", "boards.local.txt")
741-
wd, err := paths.Getwd()
742-
require.NoError(t, err)
743-
err = wd.Parent().Join("testdata", "boards.local.txt").CopyTo(boardsLocalTxt)
741+
err = paths.New("..", "testdata", "boards.local.txt").CopyTo(boardsLocalTxt)
744742
require.NoError(t, err)
745743
// Remove the file at the end of the test to avoid disrupting following tests
746744
defer boardsLocalTxt.Remove()

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

+2-5
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,10 @@ func TestCompileManuallyInstalledPlatformUsingBoardsLocalTxt(t *testing.T) {
163163
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
164164
defer env.CleanUp()
165165

166-
_, _, err := cli.Run("update")
167-
require.NoError(t, err)
168-
169166
sketchName := "CompileSketchManuallyInstalledPlatformUsingBoardsLocalTxt"
170167
sketchPath := cli.SketchbookDir().Join(sketchName)
171168
fqbn := "arduino-beta-development:avr:nessuno"
172-
_, _, err = cli.Run("sketch", "new", sketchPath.String())
169+
_, _, err := cli.Run("sketch", "new", sketchPath.String())
173170
require.NoError(t, err)
174171

175172
// Manually installs a core in sketchbooks hardware folder
@@ -188,7 +185,7 @@ func TestCompileManuallyInstalledPlatformUsingBoardsLocalTxt(t *testing.T) {
188185
// Verifies compilation fails because board doesn't exist
189186
_, stderr, err := cli.Run("compile", "--clean", "-b", fqbn, sketchPath.String())
190187
require.Error(t, err)
191-
require.Contains(t, string(stderr), "Error during build: Error resolving FQBN: board arduino-beta-development:avr:nessuno not found")
188+
require.Contains(t, string(stderr), "Error during build: Invalid FQBN: board arduino-beta-development:avr:nessuno not found")
192189

193190
// Use custom boards.local.txt with made arduino:avr:nessuno board
194191
boardsLocalTxt := repoDir.Join("boards.local.txt")

0 commit comments

Comments
 (0)